Commit d4dc816e authored by Jason Madden's avatar Jason Madden

Add pyproject.toml and drop ci-requirements.txt in favor of just dev-requirements.txt

parent 2c5ef981
......@@ -20,6 +20,10 @@
- gevent binary wheels are now manylinux2010 and include libuv
support. pip 19 is needed to install them. See :issue:`1346`.
- gevent sources include a pyproject.toml file, specifying the build
requirements and enabling build isolation. pip 18 or above is needed
to take advantage of this. See :issue:`1180`.
- Python 3.7 subprocess: Copy a ``STARTUPINFO`` passed as a parameter.
Contributed by AndCycle in :pr:`1352`.
......
......@@ -19,6 +19,7 @@ include *.yml
include *.txt
include _setup*.py
include CHANGES.rst
include pyproject.toml
include tox.ini
include .pep8
......
......@@ -159,8 +159,7 @@ develop:
# Then start installing our deps so they can be cached. Note that use of --build-options / --global-options / --install-options
# disables the cache.
# We need wheel>=0.26 on Python 3.5. See previous revisions.
time ${PYTHON} -m pip install -U --upgrade-strategy=eager -r ci-requirements.txt
GEVENTSETUP_EV_VERIFY=3 time ${PYTHON} -m pip install -U --upgrade-strategy=eager -e .[test,dnspython,events]
GEVENTSETUP_EV_VERIFY=3 time ${PYTHON} -m pip install -U --upgrade-strategy=eager -r dev-requirements.txt
${PYTHON} -m pip freeze
ccache -s
@${PYTHON} scripts/travis.py fold_end install
......
......@@ -130,12 +130,6 @@ install:
# about it being out of date.
- "%CMD_IN_ENV% %PYEXE% -m pip install --disable-pip-version-check --user --upgrade pip"
# Install the build dependencies of the project. If some dependencies contain
# compiled extensions and are not provided as pre-built wheel packages,
# pip will build them from source using the MSVC compiler matching the
# target Python version and architecture
- "%CMD_IN_ENV% %PYEXE% -m pip install -U --upgrade-strategy=eager -r ci-requirements.txt"
- ps: "if(Test-Path(\"${env:PYTHON}\\bin\")) {ls ${env:PYTHON}\\bin;}"
- ps: "if(Test-Path(\"${env:PYTHON}\\Scripts\")) {ls ${env:PYTHON}\\Scripts;}"
......@@ -145,14 +139,7 @@ cache:
build_script:
# Build the compiled extension
- "%CMD_IN_ENV% %PYEXE% -m pip wheel . -w dist"
- ps: "ls dist"
# Now install the wheel.
# I couldn't get wildcards to work for pip install, so stuff it
# into a variable, using python to glob.
- "%PYEXE% -c \"import glob; print(glob.glob('dist/gevent*whl')[0])\" > whl.txt"
- set /p PYWHL=<whl.txt
- if not "%GWHEEL_ONLY%"=="true" %PYEXE% -m pip install -U --upgrade-strategy=eager %PYWHL%[test,events,dnspython]
- if not "%GWHEEL_ONLY%"=="true" %PYEXE% -m pip install -U --upgrade-strategy=eager -r dev-requirements.txt
test_script:
# Run the project tests
......@@ -161,10 +148,7 @@ test_script:
- if not "%GWHEEL_ONLY%"=="true" %PYEXE% -mgevent.tests --config known_failures.py --quiet
after_test:
# We already built the wheel during build_script, because it's
# much faster to do that and install from the wheel than to
# rebuild it here
#- "%CMD_IN_ENV% %PYEXE% setup.py bdist_wheel bdist_wininst"
- "%CMD_IN_ENV% %PYEXE% -m pip wheel . -w dist"
- ps: "ls dist"
artifacts:
......
setuptools
wheel
# Python 3.7 requires at least Cython 0.27.3.
# 0.28 is faster, and (important!) lets us specify the target module
# name to be created so that we can have both foo.py and _foo.so
# at the same time. 0.29 fixes some issues with Python 3.7,
# and adds the 3str mode for transition to Python 3.
Cython >= 0.29.6
# Python 3.7 requires at least 0.4.14, which is ABI incompatible with earlier
greenlet>=0.4.14 ; platform_python_implementation == "CPython"
pylint>=1.8.0 ; python_version < "3.4"
# pylint 2 needs astroid 2; unfortunately, it uses `typed_ast`
# which has a C extension that doesn't build on PyPy
pylint >= 2.3.1 ; python_version >= "3.4" and platform_python_implementation == "CPython"
astroid >= 2.2.5 ; python_version >= "3.4" and platform_python_implementation == "CPython"
# See version requirements in setup.py
cffi >= 1.12.2 ; platform_python_implementation == "CPython"
# benchmarks use this
perf >= 1.6.0
......@@ -3,5 +3,13 @@
# https://github.com/mgedmin/restview
restview
-r ci-requirements.txt
pylint>=1.8.0 ; python_version < "3.4"
# pylint 2 needs astroid 2; unfortunately, it uses `typed_ast`
# which has a C extension that doesn't build on PyPy
pylint >= 2.3.1 ; python_version >= "3.4" and platform_python_implementation == "CPython"
astroid >= 2.2.5 ; python_version >= "3.4" and platform_python_implementation == "CPython"
# benchmarks use this
perf >= 1.6.0
-e .[test,events,dnspython,doc]
......@@ -79,10 +79,9 @@ here are some things you need to know.
`have issues installing gevent for this reason
<https://github.com/pypa/pipenv/issues/2113>`_.
- To build the libuv backend (which is required on Windows and
optional elsewhere), or the CFFI-based libev backend, you must
install `cffi`_ before attempting to install gevent on CPython (on
PyPy this step is not necessary).
- gevent comes with a pyproject.toml file that installs the build
dependencies, including CFFI (needed for libuv support). pip 18 or
above is required.
Common Installation Issues
......@@ -143,7 +142,7 @@ Development
To install the latest development version::
pip install setuptools cffi 'cython>=0.28' git+git://github.com/gevent/gevent.git#egg=gevent
pip install git+git://github.com/gevent/gevent.git#egg=gevent
.. note::
......
[build-system]
requires = [
"setuptools",
"wheel",
# Python 3.7 requires at least Cython 0.27.3.
# 0.28 is faster, and (important!) lets us specify the target module
# name to be created so that we can have both foo.py and _foo.so
# at the same time. 0.29 fixes some issues with Python 3.7,
# and adds the 3str mode for transition to Python 3.
"Cython >= 0.29.6",
# See version requirements in setup.py
"cffi >= 1.12.2 ; platform_python_implementation == 'CPython'",
# Python 3.7 requires at least 0.4.14, which is ABI incompatible with earlier
"greenlet>=0.4.14 ; platform_python_implementation == 'CPython'",
]
......@@ -35,10 +35,5 @@ echo cloning $BASE
git clone $BASE gevent
cd ./gevent
pip install -U pip
pip install -U setuptools greenlet cffi
pip install -U wheel
# We may need different versions of deps depending on the
# version of python; that's captured in this file.
pip install -U -r dev-requirements.txt
python ./setup.py sdist bdist_wheel
cp dist/*whl /tmp/gevent/
pip wheel . -w dist
cp dist/gevent*whl /tmp/gevent/
......@@ -18,13 +18,9 @@ if [ -d /gevent -a -d /opt/python ]; then
cd /tmp/build
git clone /gevent gevent
cd gevent
$variant/bin/pip install -q -U -r ci-requirements.txt
# auditwheel 2.0.0 needs this version; auditwheel is installed into
# the python3.6 interpreter
$variant/bin/pip install wheel==0.31.1
PATH=$variant/bin:$PATH $variant/bin/python setup.py bdist_wheel -q
auditwheel repair --plat manylinux2010_x86_64 dist/*.whl
cp wheelhouse/*.whl /gevent/wheelhouse
PATH=$variant/bin:$PATH $variant/bin/pip wheel . -w dist
auditwheel repair --plat manylinux2010_x86_64 dist/gevent*.whl
cp wheelhouse/gevent*.whl /gevent/wheelhouse
cd /gevent
rm -rf /tmp/build
done
......
......@@ -215,7 +215,7 @@ greenlet_requires = [
# to be the default, and that requires cffi; but don't try to install it
# on PyPy or it messes up the build
cffi_requires = [
"cffi >= 1.11.5 ; sys_platform == 'win32' and platform_python_implementation == 'CPython'",
"cffi >= 1.12.2 ; sys_platform == 'win32' and platform_python_implementation == 'CPython'",
]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment