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

Conversation

webknjaz
Copy link
Member

@webknjaz webknjaz commented Jan 31, 2019

The source code of "try pip install" is @ https://github.com/webknjaz/fortunate-pkg because I thought it might be useful for other projects because it's the only reliable and pip-implemented way of invoking PEP 517 build backend.

What do these changes do?

This basically adds fortunate-pkg as a requisite of build-system (PEP 517 / PEP 518).

Then, setup.py uses it to trigger pip install cython and ignore the result. So it would install Cython into an isolated build env created by Pip only if the user's OS has the build toolchain available (GCC in particular) and if it succeeds to compile Cython.

Are there changes in behavior for the user?

With modern pip they don't have to care about pre-installing cython req manually.

Related issue number

This PoC should fix #3581 but needs futher discussion.
cc @pradyunsg plz participate

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

@webknjaz

This comment has been minimized.

@webknjaz

This comment has been minimized.

@kxepal

This comment has been minimized.

@codecov-io

This comment has been minimized.

setup.py Outdated Show resolved Hide resolved
@webknjaz

This comment has been minimized.

@webknjaz
Copy link
Member Author

Oh, and that might also need to go through the PEP process first to get a standard name for such optional requirement option + having "ignoring logic" requires some dynamic code which is not really a part of PEP 517 / PEP 518.

@samuelcolvin

This comment has been minimized.

@webknjaz

This comment has been minimized.

setup.py Outdated Show resolved Hide resolved
@webknjaz
Copy link
Member Author

webknjaz commented Feb 5, 2019

@asvetlov @samuelcolvin @kxepal

So I'm investigating ways of shipping the build script within this repo.
One way is to have an "installable dist" folder (with a separate setup.py) just for a builder tool and the other way is to use https://github.com/takluyver/intreehooks (pointed out by @pradyunsg) which allows working around the limitation of being unable to reference local scripts directly (https://discuss.python.org/t/pep-517-backend-bootstrapping/789).

So what do you think? Should I rely on intreehooks shim or hack it all within aiohttp repo?

@kxepal

This comment has been minimized.

@webknjaz

This comment has been minimized.

…c4c83'

git-subtree-dir: build_aiohttp
git-subtree-mainline: f580542
git-subtree-split: 6de8265
@webknjaz webknjaz changed the title Install Cython in isolated env using fortunate-pkg [WIP] Install Cython in isolated env using fortunate-pkg Apr 14, 2019
@cla-bot

This comment has been minimized.

@asvetlov
Copy link
Member

I think the PR can be closed: we use an alternative solution for cython sources translation.

@webknjaz
Copy link
Member Author

Okay, I can always restore this if needed.

@webknjaz webknjaz closed this Jul 19, 2019
@asvetlov asvetlov deleted the bugfix/3581-cython-in-isolated-pip-env branch September 7, 2019 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sdist build gets crashed under pip>=19 in dev mode
5 participants