Skip to content

Commit

Permalink
REL: require Python 3.x, and ensure it cannot be installed for 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
rgommers committed Nov 30, 2022
1 parent ecfd527 commit 8079c04
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
over algorithms written in pure Python.
``scipy-weave`` is the stand-alone version of the removed SciPy submodule
``scipy.weave``. It is Python 2.x only, and is provided for users that need
versions of SciPy from which the ``weave`` submodule has been removed but
have existing code that still depends on ``scipy.weave``. For new code, users
are recommended to use Cython.
``scipy.weave``. It is Python 3.x only (see versions <0.19.0 for Python
2.6-2.7 support), and is provided for users that need versions of SciPy from
which the ``weave`` submodule has been removed but have existing code that
still depends on ``scipy.weave``. For new code, users are recommended to use
Cython.
To install ``scipy-weave``, use of pip is recommended::
Expand All @@ -27,13 +28,16 @@
import subprocess
import os

if not sys.version_info[0] == 3:
raise RuntimeError("Python 3.x is required")

CLASSIFIERS = """\
Development Status :: 4 - Beta
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI Approved
Programming Language :: C
Programming Language :: Python
Programming Language :: Python :: 3
Topic :: Software Development
Topic :: Scientific/Engineering
Operating System :: Microsoft :: Windows
Expand Down Expand Up @@ -175,6 +179,7 @@ def setup_package():
classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f],
platforms = ["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
test_suite='nose.collector',
python_requires='>=3.4,<3.10', # parser module removed in 3.10
)

if len(sys.argv) >= 2 and ('--help' in sys.argv[1:] or
Expand Down

0 comments on commit 8079c04

Please sign in to comment.