-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
62 lines (51 loc) · 1.46 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env python3
"""
* Install with pip (recommended):
pip3 install .
* Install with setuptools:
python setup.py install
* Run tests:
python setup.py pytest
* Build documentation:
pip install -r requirements-doc.txt
cd docs/
make clean html
"""
from pathlib import Path
from setuptools import setup
import mod
def long_description():
banned = ('.. toctree', '.. autoclass', '* :ref:', '.. image:: _static/')
comment = '.. '
text = Path(__file__).parent.joinpath('docs', 'index.rst').read_text()
for word in banned:
text = text.replace(word, comment)
return text
setup(
# Package info
name="mod",
author="Y. SOMDA",
version=mod.__version__,
url="https://github.com/yoeo/mod",
description="Modular arithmetic in Python",
long_description=long_description(),
license="MIT",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Libraries :: Python Modules",
],
# Install setup
python_requires='>=3',
platforms='any',
py_modules=['mod'],
zip_safe=True,
# Test setup
setup_requires=['pytest-runner'],
tests_require='pytest',
)