-
Notifications
You must be signed in to change notification settings - Fork 56
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
Install setup requirements on-the-fly #101
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
dcdc162
add gha
yannikschaelte a50b2f4
test
yannikschaelte 87e9012
add catch
yannikschaelte b83a36f
2nd catch
yannikschaelte 69fe8e7
install deps
yannikschaelte 9cd79fa
spec ubuntu
yannikschaelte a65614b
tidy up
yannikschaelte 123cde7
tidy up
yannikschaelte ae1d2fd
fixup
yannikschaelte 27b2d3b
update travis
yannikschaelte 7e764d8
remove gha
yannikschaelte 424f01b
revert conda install; rm wheel
yannikschaelte 841b005
travis parsing doesn't work
yannikschaelte 1606bf3
spacing
yannikschaelte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,15 @@ | |
|
||
from setuptools import setup | ||
from setuptools.extension import Extension | ||
|
||
# install requirements before import | ||
from setuptools import dist | ||
SETUP_REQUIRES = [ | ||
"cython >= 0.26", | ||
"numpy >= 1.15", | ||
] | ||
dist.Distribution().fetch_build_eggs(SETUP_REQUIRES) | ||
|
||
from Cython.Distutils import build_ext | ||
import numpy as np | ||
|
||
|
@@ -41,12 +50,13 @@ | |
AUTHOR = "Matthias Kümmerer" | ||
EMAIL = "[email protected]" | ||
URL = "https://github.com/matthias-k/cyipopt" | ||
DEPENDENCIES = ["numpy>=1.15", | ||
"cython>=0.26", | ||
"future>=0.15", | ||
"setuptools>=39.0", | ||
"six>=1.11" | ||
] | ||
INSTALL_REQUIRES = [ | ||
"numpy>=1.15", | ||
"cython>=0.26", | ||
"future>=0.15", | ||
"setuptools>=39.0", | ||
"six>=1.11", | ||
] | ||
LICENSE = "EPL-1.0" | ||
CLASSIFIERS = [ | ||
"Development Status :: 4 - Beta", | ||
|
@@ -195,7 +205,8 @@ def handle_ext_modules_general_os(): | |
license=LICENSE, | ||
classifiers=CLASSIFIERS, | ||
packages=[PACKAGE_NAME, DEPRECATED_PACKAGE_NAME], | ||
install_requires=DEPENDENCIES, | ||
setup_requires=SETUP_REQUIRES, | ||
install_requires=INSTALL_REQUIRES, | ||
include_package_data=include_package_data, | ||
data_files=DATA_FILES, | ||
zip_safe=False, # required for Py27 on Windows to work | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 likely that cython and setuptools are not needed to run the library. We'd need to double check.
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 think Cython could be removed here, but not necessarily numpy. Shouldn't setuptools be a build dep then too? I don't see it used anywhere but
setup.py
.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.
true ... I did not want to meddle too much with the build, but certainly possible that cython/numpy can be removed under install_requires (here I did not change those dependencies at all).
setuptools should technically be a build dep too, however I guess that would only work via pyproject.toml or setup.cfg, as setup.py is completely based on setuptools. afaik, it is usually pre-installed on python distros.
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.
Understood. The file requires an import of setuptools itself, so it has to be pre-installed. We can leave this as is.