-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Require cython when building from git clone only #3189
Conversation
setup.py
Outdated
if (here / '.git').exists() and not (here / 'vendor/http-parser/README.md'): | ||
print("Install submodules when building from git clone") | ||
print("git submodule init") | ||
print("git submodule update") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's simpler to do git submodule update --init
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, how about to do that automagically if condition is met? Since we know which commands are need to run. Suddenly, it wouldn't be useful for Cython - setup_requires can't handle wheels /:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is for dev module only.
I prefer don't hide git commands from user here.
There is a rare possibility to have no git
command in PATH
, better to give a hint only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that's fine for me.
setup.py
Outdated
|
||
try: | ||
from Cython.Build import cythonize | ||
USE_CYTHON = True | ||
except ImportError: | ||
USE_CYTHON = False | ||
|
||
if (here / '.git').exists() and not USE_CYTHON: | ||
print("Install cython when building from git clone") | ||
print("pip install cython") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this to pyproject.toml
and it'll be autoinstalled for pip 10+ users.
setup.py
Outdated
|
||
try: | ||
from Cython.Build import cythonize | ||
USE_CYTHON = True | ||
except ImportError: | ||
USE_CYTHON = False | ||
|
||
if (here / '.git').exists() and not USE_CYTHON: | ||
print("Install cython when building from git clone") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use stderr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
setup.py
Outdated
|
||
if (here / '.git').exists() and not (here / 'vendor/http-parser/README.md'): | ||
print("Install submodules when building from git clone") | ||
print("git submodule update --init") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try calling this from here it'd be smooth for users then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to call/install anything, just generate a better error message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, improve it by adding Please do so by running:
prefix.
.travis.yml
Outdated
@@ -152,12 +152,16 @@ jobs: | |||
- <<: *_doc_base | |||
env: | |||
- TARGET=towncrier | |||
install: | |||
- pip install -r requirements/towncrier.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're also overriding - *upgrade_python_toolset
here.
Codecov Report
@@ Coverage Diff @@
## master #3189 +/- ##
==========================================
- Coverage 98.11% 98.07% -0.04%
==========================================
Files 43 43
Lines 7853 7853
Branches 1354 1354
==========================================
- Hits 7705 7702 -3
- Misses 57 59 +2
- Partials 91 92 +1
Continue to review full report at Codecov.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Fixes #3162
Supersedes #3164