Commit 82cc932b authored by Jason Madden's avatar Jason Madden Committed by GitHub

Merge pull request #1392 from gevent/issue1180

Add pyproject.toml
parents 2c5ef981 82015a46
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
- gevent binary wheels are now manylinux2010 and include libuv - gevent binary wheels are now manylinux2010 and include libuv
support. pip 19 is needed to install them. See :issue:`1346`. 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. - Python 3.7 subprocess: Copy a ``STARTUPINFO`` passed as a parameter.
Contributed by AndCycle in :pr:`1352`. Contributed by AndCycle in :pr:`1352`.
......
...@@ -19,6 +19,7 @@ include *.yml ...@@ -19,6 +19,7 @@ include *.yml
include *.txt include *.txt
include _setup*.py include _setup*.py
include CHANGES.rst include CHANGES.rst
include pyproject.toml
include tox.ini include tox.ini
include .pep8 include .pep8
......
...@@ -159,8 +159,7 @@ develop: ...@@ -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 # Then start installing our deps so they can be cached. Note that use of --build-options / --global-options / --install-options
# disables the cache. # disables the cache.
# We need wheel>=0.26 on Python 3.5. See previous revisions. # 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 -r dev-requirements.txt
GEVENTSETUP_EV_VERIFY=3 time ${PYTHON} -m pip install -U --upgrade-strategy=eager -e .[test,dnspython,events]
${PYTHON} -m pip freeze ${PYTHON} -m pip freeze
ccache -s ccache -s
@${PYTHON} scripts/travis.py fold_end install @${PYTHON} scripts/travis.py fold_end install
......
...@@ -130,12 +130,6 @@ install: ...@@ -130,12 +130,6 @@ install:
# about it being out of date. # about it being out of date.
- "%CMD_IN_ENV% %PYEXE% -m pip install --disable-pip-version-check --user --upgrade pip" - "%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}\\bin\")) {ls ${env:PYTHON}\\bin;}"
- ps: "if(Test-Path(\"${env:PYTHON}\\Scripts\")) {ls ${env:PYTHON}\\Scripts;}" - ps: "if(Test-Path(\"${env:PYTHON}\\Scripts\")) {ls ${env:PYTHON}\\Scripts;}"
...@@ -145,14 +139,7 @@ cache: ...@@ -145,14 +139,7 @@ cache:
build_script: build_script:
# Build the compiled extension # Build the compiled extension
- "%CMD_IN_ENV% %PYEXE% -m pip wheel . -w dist" - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -m pip install -U --upgrade-strategy=eager -r dev-requirements.txt
- 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]
test_script: test_script:
# Run the project tests # Run the project tests
...@@ -161,10 +148,13 @@ test_script: ...@@ -161,10 +148,13 @@ test_script:
- if not "%GWHEEL_ONLY%"=="true" %PYEXE% -mgevent.tests --config known_failures.py --quiet - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -mgevent.tests --config known_failures.py --quiet
after_test: after_test:
# We already built the wheel during build_script, because it's # pycparser can't be built correctly in an isolated environment.
# much faster to do that and install from the wheel than to # See
# rebuild it here # https://ci.appveyor.com/project/denik/gevent/builds/23810605/job/83aw4u67artt002b#L602
#- "%CMD_IN_ENV% %PYEXE% setup.py bdist_wheel bdist_wininst" # So we violate DRY and repeate some requirements in order to use
# --no-build-isolation
- "%CMD_IN_ENV% %PYEXE% -m pip install -U --upgrade-strategy=eager pycparser wheel cython setuptools"
- "%CMD_IN_ENV% %PYEXE% -m pip wheel --no-build-isolation . -w dist"
- ps: "ls dist" - ps: "ls dist"
artifacts: 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 @@ ...@@ -3,5 +3,13 @@
# https://github.com/mgedmin/restview # https://github.com/mgedmin/restview
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] -e .[test,events,dnspython,doc]
...@@ -79,10 +79,9 @@ here are some things you need to know. ...@@ -79,10 +79,9 @@ here are some things you need to know.
`have issues installing gevent for this reason `have issues installing gevent for this reason
<https://github.com/pypa/pipenv/issues/2113>`_. <https://github.com/pypa/pipenv/issues/2113>`_.
- To build the libuv backend (which is required on Windows and - gevent comes with a pyproject.toml file that installs the build
optional elsewhere), or the CFFI-based libev backend, you must dependencies, including CFFI (needed for libuv support). pip 18 or
install `cffi`_ before attempting to install gevent on CPython (on above is required.
PyPy this step is not necessary).
Common Installation Issues Common Installation Issues
...@@ -143,7 +142,7 @@ Development ...@@ -143,7 +142,7 @@ Development
To install the latest development version:: 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:: .. note::
......
[build-system]
build-backend = "setuptools.build_meta:__legacy__"
requires = [
"setuptools >= 40.8.0",
"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 ...@@ -35,10 +35,5 @@ echo cloning $BASE
git clone $BASE gevent git clone $BASE gevent
cd ./gevent cd ./gevent
pip install -U pip pip install -U pip
pip install -U setuptools greenlet cffi pip wheel . -w dist
pip install -U wheel cp dist/gevent*whl /tmp/gevent/
# 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/
...@@ -18,13 +18,9 @@ if [ -d /gevent -a -d /opt/python ]; then ...@@ -18,13 +18,9 @@ if [ -d /gevent -a -d /opt/python ]; then
cd /tmp/build cd /tmp/build
git clone /gevent gevent git clone /gevent gevent
cd gevent cd gevent
$variant/bin/pip install -q -U -r ci-requirements.txt PATH=$variant/bin:$PATH $variant/bin/pip wheel . -w dist
# auditwheel 2.0.0 needs this version; auditwheel is installed into auditwheel repair --plat manylinux2010_x86_64 dist/gevent*.whl
# the python3.6 interpreter cp wheelhouse/gevent*.whl /gevent/wheelhouse
$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
cd /gevent cd /gevent
rm -rf /tmp/build rm -rf /tmp/build
done done
......
...@@ -215,7 +215,7 @@ greenlet_requires = [ ...@@ -215,7 +215,7 @@ greenlet_requires = [
# to be the default, and that requires cffi; but don't try to install it # to be the default, and that requires cffi; but don't try to install it
# on PyPy or it messes up the build # on PyPy or it messes up the build
cffi_requires = [ 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