From 021d04069a9c49bc29c6f4415e3d2b4b7a02012e Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 16 Jan 2019 11:42:09 -0500 Subject: [PATCH] Build metadata modernization - pyproject.toml and python_requires (#3167) * Added pyproject.toml This adds the build requirements metadata to the repo, which can be used with any build tools that implement PEP 517 and PEP 518 (e.g. pip, tox). It is no longer necessary to have the build dependencies installed when installing from source. * Add python_requires for 2.7, 3.4+ This directive specifies in the build metadata which version of CPython is supported by this version of spaCy, which pip will take into account when determining what version to download. This will allow you to safely drop old versions of Python without `pip install spaCy` breaking for those versions. * Add Python 3.7 to the trove classifiers --- MANIFEST.in | 1 + pyproject.toml | 10 ++++++++++ setup.py | 2 ++ 3 files changed, 13 insertions(+) create mode 100644 pyproject.toml diff --git a/MANIFEST.in b/MANIFEST.in index 4d804a23e..5470ab09c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ recursive-include include *.h include LICENSE include README.rst +include pyproject.toml include bin/spacy diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..294adefe9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,10 @@ +[build-system] +requires = ["setuptools", + "wheel>0.32.0.<0.33.0", + "Cython", + "cymem>=2.0.2,<2.1.0", + "preshed>=2.0.1,<2.1.0", + "murmurhash>=0.28.0,<1.1.0", + "thinc>=6.12.1,<6.13.0", + ] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index f2c45ad6c..4802d8da7 100755 --- a/setup.py +++ b/setup.py @@ -220,6 +220,7 @@ def setup_package(): 'cuda100': ['cupy-cuda100>=4.0', 'thinc_gpu_ops>=0.0.3,<0.1.0'], 'ja': ['mecab-python3==0.7'] }, + python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', @@ -236,6 +237,7 @@ def setup_package(): 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Topic :: Scientific/Engineering'], cmdclass = { 'build_ext': build_ext_subclass},