forked from discopy/discopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
38 lines (34 loc) · 1.41 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""
Setup discopy package.
"""
if __name__ == '__main__': # pragma: no cover
from re import search, M
from setuptools import setup, find_packages
with open('discopy/__init__.py', 'r') as file:
MATCH = search(r"^__version__ = ['\"]([^'\"]*)['\"]", file.read(), M)
if MATCH:
VERSION = MATCH.group(1)
else:
raise RuntimeError("Unable to find version string.")
with open('test/requirements.txt', 'r') as file:
TEST_REQ = [line.strip() for line in file.readlines()]
setup(name='discopy',
version=VERSION,
package_dir={'discopy': 'discopy'},
packages=find_packages(),
description='Distributional Compositional Python',
long_description=open("README.md", "r").read(),
long_description_content_type="text/markdown",
url='https://github.com/oxford-quantum-group/discopy',
author='Alexis Toumi',
author_email='[email protected]',
download_url='https://github.com/'
'oxford-quantum-group/discopy/archive/'
'{}.tar.gz'.format(VERSION),
install_requires=[
l.strip() for l in open('requirements.txt').readlines()],
tests_require=TEST_REQ,
extras_require={'test': TEST_REQ},
data_file=[('test', ['test/requirements.txt'])],
python_requires='>=3',
)