|
1 | 1 | #!/usr/bin/env python |
2 | 2 | # -*- coding: utf-8 -*- |
3 | 3 |
|
4 | | -from setuptools import setup |
5 | | -setup() |
| 4 | +import os.path as osp |
| 5 | +import platform |
| 6 | +import sys |
| 7 | + |
| 8 | +from setuptools import find_namespace_packages, setup |
| 9 | + |
| 10 | +# Ensure user has the correct Python version |
| 11 | +if sys.version_info < (3, 8): |
| 12 | + print("Mathics support Python 3.8 and above; you have %d.%d" % sys.version_info[:2]) |
| 13 | + sys.exit(-1) |
| 14 | + |
| 15 | + |
| 16 | +def get_srcdir(): |
| 17 | + filename = osp.normcase(osp.dirname(osp.abspath(__file__))) |
| 18 | + return osp.realpath(filename) |
| 19 | + |
| 20 | + |
| 21 | +def read(*rnames): |
| 22 | + return open(osp.join(get_srcdir(), *rnames)).read() |
| 23 | + |
| 24 | + |
| 25 | +# Get/set VERSION and long_description from files |
| 26 | +long_description = read("README.rst") + "\n" |
| 27 | + |
| 28 | +__version__ = "0.0.0" # overwritten by exec below |
| 29 | + |
| 30 | +# stores __version__ in the current namespace |
| 31 | +exec(compile(open("pymathics/trepan/version.py").read(), "version.py", "exec")) |
| 32 | + |
| 33 | +is_PyPy = platform.python_implementation() == "PyPy" |
| 34 | + |
| 35 | +# Install a wordlist. |
| 36 | +# Environment variables "lang", "WORDLIST_SIZE", and "SPACY_DOWNLOAD" override defaults. |
| 37 | + |
| 38 | +setup( |
| 39 | + name="Mathics3-trepan", |
| 40 | + version=__version__, |
| 41 | + packages=find_namespace_packages(include=["pymathics.*"]), |
| 42 | + install_requires=[ |
| 43 | + "Mathics3>=8.0.0", |
| 44 | + "trepan3k>=1.3.1", |
| 45 | + "mathics-pygments", |
| 46 | + ], |
| 47 | + zip_safe=False, |
| 48 | + maintainer="Mathics3 Group", |
| 49 | + maintainer_email="[email protected]", |
| 50 | + long_description=long_description, |
| 51 | + long_description_content_type="text/x-rst", |
| 52 | + # metadata for upload to PyPI |
| 53 | + classifiers=[ |
| 54 | + "Intended Audience :: Developers", |
| 55 | + "Intended Audience :: Science/Research", |
| 56 | + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", |
| 57 | + "Programming Language :: Python", |
| 58 | + "Programming Language :: Python :: 3.8", |
| 59 | + "Programming Language :: Python :: 3.9", |
| 60 | + "Programming Language :: Python :: 3.10", |
| 61 | + "Programming Language :: Python :: 3.11", |
| 62 | + "Programming Language :: Python :: 3.12", |
| 63 | + "Programming Language :: Python :: Implementation :: CPython", |
| 64 | + "Programming Language :: Python :: Implementation :: PyPy", |
| 65 | + "Topic :: Scientific/Engineering", |
| 66 | + "Topic :: Scientific/Engineering :: Mathematics", |
| 67 | + "Topic :: Software Development :: Interpreters", |
| 68 | + "Topic :: Software Development :: Debuggers", |
| 69 | + ], |
| 70 | +) |
0 commit comments