Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Install Cython in isolated env using fortunate-pkg #3589

Closed
wants to merge 60 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
51cd94b
🎉🎨 Add the fortunate installer initial version
webknjaz Jan 31, 2019
157c528
👷 Add a Travis CI config
webknjaz Jan 31, 2019
f580542
Install Cython in isolated env using fortunate-pkg
webknjaz Jan 31, 2019
45df129
📝 Add project URLs to the dist meta
webknjaz Jan 31, 2019
6de8265
Add Travis CI and PyPI badges to README
webknjaz Jan 31, 2019
2bba320
Add 'build_aiohttp/' from commit '6de8265f9d616eff303c353fe3edfc38e20…
webknjaz Feb 7, 2019
729f9f9
Add an in-tree PEP 517 build backend
webknjaz Apr 14, 2019
dd78984
Merge remote-tracking branch 'origin/master' into bugfix/3581-cython-…
webknjaz Apr 14, 2019
7f9d61a
Merge remote-tracking branch 'origin/master' into bugfix/3581-cython-…
webknjaz Apr 15, 2019
050850b
Set appveyor encoding to utf-8
webknjaz Apr 15, 2019
d1444d0
Upgrade pip to 19 in CIs
webknjaz Apr 15, 2019
2525fde
🔥 Use fortunate_pkg PEP 517 build backend
webknjaz Apr 15, 2019
996ff90
🎨 Single-source cython build dependency
webknjaz Apr 15, 2019
bdeb1c0
Don't build dist when checking it
webknjaz Apr 15, 2019
70bf0b0
🚑 Build dists for the metadata check in Travis CI
webknjaz Apr 15, 2019
4ec90d2
🐛 Build dists in AppVeyor via PEP 517
webknjaz Apr 15, 2019
16f0111
Don't use editable install in tests
webknjaz Apr 15, 2019
b111fc4
Print out debug paths in AppVeyor
webknjaz Apr 15, 2019
d6ed8ed
Print setup args
webknjaz Apr 15, 2019
c4e07e8
print site-packages
webknjaz Apr 15, 2019
d574607
Bump fortunate-pkg to v0.2.1
webknjaz Apr 15, 2019
d7938f6
print level up
webknjaz Apr 15, 2019
5fe0562
Shuffle stuff
webknjaz Apr 15, 2019
d793cf1
inject py
webknjaz Apr 15, 2019
f70ca50
Just 3.7
webknjaz Apr 15, 2019
c93b8d3
print overlay
webknjaz Apr 15, 2019
8964af0
lib
webknjaz Apr 15, 2019
e6f69ed
python3.7
webknjaz Apr 15, 2019
cd299da
RuntimeError
webknjaz Apr 15, 2019
6a4e5fb
Unruntime err
webknjaz Apr 15, 2019
0318f12
Bump fortunate-pkg to v0.2.2
webknjaz Apr 15, 2019
6fae413
Hide some prints
webknjaz Apr 15, 2019
549adeb
generic
webknjaz Apr 15, 2019
48f56b6
🔥 Drop debug output from setup.py
webknjaz Apr 15, 2019
482c826
Bump fortunate-pkg to v0.2.3
webknjaz Apr 15, 2019
41dc716
Bump PyPy 3.6 to v6.0.0
webknjaz Apr 17, 2019
c8af0ac
Adjust PyPy versions
webknjaz Apr 17, 2019
884b30d
⇧ Bump fortunate_pkg to v0.2.4
webknjaz Apr 18, 2019
c5f7378
Bump fortunate_pkg to v0.2.6
webknjaz Apr 18, 2019
ae053bc
Enable RDP in the AppVeyor CI
webknjaz Apr 18, 2019
af11b61
Keep RDP session on finish
webknjaz Apr 18, 2019
9a1fff4
Remove aiohttp package in AppVeyor
webknjaz Apr 19, 2019
d0fd364
Revert "Remove aiohttp package in AppVeyor"
webknjaz Apr 19, 2019
0cd95ea
Use --no-build-isolation in AppVeyor
webknjaz Apr 19, 2019
9e68d35
Install fortunate_pkg[pep517] in AppVeyor directly
webknjaz Apr 19, 2019
8997285
Temporary mv aiohttp out of the way of pytest
webknjaz Apr 19, 2019
ee656b2
Add toggle for RDP
webknjaz Apr 19, 2019
a959c8a
Rename RDP debug var
webknjaz Apr 19, 2019
05f3344
Inline iex
webknjaz Apr 19, 2019
a003d0f
Drop iex clause
webknjaz Apr 19, 2019
5d39cdd
Revert "Drop iex clause"
webknjaz Apr 19, 2019
e81c091
Revert "Inline iex"
webknjaz Apr 19, 2019
0ed02f2
Merge branch 'master' into bugfix/3581-cython-in-isolated-pip-env
webknjaz Apr 19, 2019
e1d1a22
Merge branch 'master' into bugfix/3581-cython-in-isolated-pip-env
webknjaz Apr 19, 2019
49f7c54
Merge branch 'master' into bugfix/3581-cython-in-isolated-pip-env
webknjaz Apr 20, 2019
2486499
Ignore pip-wheel-metadata
webknjaz Apr 20, 2019
878cea3
Add build deps to Makefile
webknjaz Apr 20, 2019
481d8c7
Bump fortunate-pkg to v0.2.7
webknjaz Apr 23, 2019
a386c35
Merge remote-tracking branch 'origin/master' into bugfix/3581-cython-…
webknjaz May 10, 2019
e1549e6
Merge remote-tracking branch 'origin/master' into bugfix/3581-cython-…
webknjaz May 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ install:
- "tools/build.cmd %PYTHON%\\python.exe -m pip install -r requirements/ci.txt"

build_script:
- "tools/build.cmd %PYTHON%\\python.exe -m setup sdist bdist_wheel"
- "tools/build.cmd %PYTHON%\\python.exe -m pip install pep517"
- "tools/build.cmd %PYTHON%\\python.exe -m pep517.build --source --binary --out-dir ./dist/ ."

test_script:
- mv aiohttp aiohttp.bak
- "tools/build.cmd %PYTHON%\\python.exe -m pytest -c pytest.ci.ini --cov-report xml"
- mv aiohttp.bak aiohttp

after_test:
- "tools/build.cmd %PYTHON%\\python.exe -m codecov -f coverage.xml -X gcov"
Expand Down
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ jobs:
name: Checking Towncrier fragments
install:
- *upgrade_python_toolset
- pip install -r requirements/cython.txt
- pip install -r requirements/ci.txt
- pip install -r requirements/towncrier.txt
script:
Expand All @@ -173,7 +172,6 @@ jobs:
name: Linting source code with mypy
install:
- *upgrade_python_toolset
- pip install -r requirements/cython.txt
- pip install -r requirements/ci.txt
script:
- mypy aiohttp
Expand All @@ -182,10 +180,10 @@ jobs:
name: Verifying distribution package metadata
install:
- *upgrade_python_toolset
- pip install -r requirements/cython.txt
- pip install -r requirements/ci.txt -r requirements/doc.txt
- pip install pep517 -r requirements/ci.txt -r requirements/doc.txt
- python -m pep517.build --source --binary --out-dir ./dist/ .
script:
- python setup.py check --metadata --restructuredtext --strict --verbose sdist bdist_wheel
- python -m setup check --metadata --restructuredtext --strict --verbose
- twine check dist/*

- <<: *_lint_base
Expand Down Expand Up @@ -230,7 +228,6 @@ jobs:
- docker
script:
- ./tools/run_docker.sh "aiohttp"
- pip install -r requirements/cython.txt
- pip install -r requirements/ci.txt # to compile *.c files by Cython
deploy:
<<: *deploy_step
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PYXS = $(wildcard aiohttp/*.pyx)
all: test

.install-cython:
pip install -r requirements/cython.txt
pip install fortunate_pkg[pep517] cython
touch .install-cython

aiohttp/%.c: aiohttp/%.pyx
Expand Down Expand Up @@ -120,7 +120,7 @@ doc-spelling:
@make -C docs spelling SPHINXOPTS="-W -E"

install:
@pip install -U 'pip<19'
@pip install -U pip
@pip install -Ur requirements/dev.txt

.PHONY: all build flake test vtest cov clean doc
22 changes: 22 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
[build-system]
# NOTE: Pip will install these dependencies into an isolated venv
requires = ["fortunate-pkg[pep517] == 0.2.7"]

# NOTE: Modern setuptools implements a PEP 517 backend available at:
# build-backend = "setuptools.build_meta"
# NOTE: But we going to use a custom one since our requirements are
# NOTE: too project-specific.
build-backend = "fortunate_pkg.pep517_backend"

# NOTE: in-tree backend path usage is not yet implemented in pip
# Ref: https://www.python.org/dev/peps/pep-0517/#in-tree-build-backends
# NOTE: future config could look like this:
# backend-path = "./build-aiohttp"

[tool.fortunate-pkg.build-system]
# NOTE: These distribution will be `pip install`ed but failure to
# NOTE: complete this will be ignored. This will ensure that Cython is
# NOTE: available in the build venv if the external environments
# NOTE: allow it.
optionally-requires = ["Cython == 0.29.6"]

[tool.towncrier]
package = "aiohttp"
filename = "CHANGES.rst"
Expand Down
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ mypy-extensions==0.4.1; implementation_name=="cpython"

-r ci-wheel.txt
-r doc.txt
-e .
.
1 change: 0 additions & 1 deletion requirements/cython.txt

This file was deleted.

1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

here = pathlib.Path(__file__).parent


if (here / '.git').exists() and not (here / 'vendor/http-parser/README.md'):
print("Install submodules when building from git clone", file=sys.stderr)
print("Hint:", file=sys.stderr)
Expand Down
2 changes: 0 additions & 2 deletions tools/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ echo
echo
echo "Compile wheels"
for PYTHON in ${PYTHON_VERSIONS}; do
/opt/python/${PYTHON}/bin/pip install -r "${WORKDIR_PATH}/requirements/cython.txt"
/opt/python/${PYTHON}/bin/pip install -r "${WORKDIR_PATH}/requirements/wheel.txt"
/opt/python/${PYTHON}/bin/pip wheel "${SRC_DIR}/" --no-deps -w "${ORIG_WHEEL_DIR}/${PYTHON}" -v
done
Expand Down Expand Up @@ -82,7 +81,6 @@ for PYTHON in ${PYTHON_VERSIONS}; do
echo
echo -n "Test $PYTHON: "
/opt/python/${PYTHON}/bin/python -c "import platform; print('Building wheel for {platform} platform.'.format(platform=platform.platform()))"
/opt/python/${PYTHON}/bin/pip install -r ${WORKDIR_PATH}/requirements/cython.txt
/opt/python/${PYTHON}/bin/pip install -r ${WORKDIR_PATH}/requirements/ci-wheel.txt
/opt/python/${PYTHON}/bin/pip install "$package_name" --no-index -f "file://${WHEELHOUSE_DIR}"
/opt/python/${PYTHON}/bin/py.test ${WORKDIR_PATH}/tests
Expand Down