-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CI: Use conda compiler in environment.yml
#27062
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
Conversation
…tual env instead of the system
Makefile
Outdated
@@ -10,7 +10,7 @@ clean_pyc: | |||
-find . -name '*.py[co]' -exec rm {} \; | |||
|
|||
build: clean_pyc | |||
python setup.py build_ext --inplace | |||
python setup.py build_ext --inplace --compiler=$CC |
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.
this is not used in our CI at all, though I do use it locally, so nice to improve this generally.
We should add some documentation (in contributing.rst) that things exist & work (not 100% sure this actually works on windows; the Makefile)
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.
That is true, unless pandas
is using mingw
it will not going to use it, indeed
but this part I am just enforcing it, because cython
usually already uses the $CC
#27061 should be merged first, after that I can rebase from |
For example, it will use the compiler from the conda virtual environment
That would be multiplatform as well, in that way it will isolate the compilation process from the system As you can see it is using this compiler |
Still need some work, the CI is getting the compiler from the system, at least for |
Codecov Report
@@ Coverage Diff @@
## master #27062 +/- ##
==========================================
- Coverage 92.04% 92.03% -0.01%
==========================================
Files 180 180
Lines 50713 50713
==========================================
- Hits 46680 46676 -4
- Misses 4033 4037 +4
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #27062 +/- ##
=========================================
- Coverage 92.98% 91.78% -1.2%
=========================================
Files 184 180 -4
Lines 50362 50934 +572
=========================================
- Hits 46827 46752 -75
- Misses 3535 4182 +647
Continue to review full report at Codecov.
|
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 we should test this in windows, I guess Makefile
is rarely used if ever, but we want to make sure the environment can be resolved.
I'll see if I have time to add the build of the docs from windows, and then we'll have a windows build using environment.yml
, but if someone can test this before manually that would be great.
environment.yml
Outdated
@@ -79,5 +81,4 @@ dependencies: | |||
- xlrd # pandas.read_excel, DataFrame.to_excel, pandas.ExcelWriter, pandas.ExcelFile | |||
- xlsxwriter # pandas.read_excel, DataFrame.to_excel, pandas.ExcelWriter, pandas.ExcelFile | |||
- xlwt # pandas.read_excel, DataFrame.to_excel, pandas.ExcelWriter, pandas.ExcelFile | |||
- pip: | |||
- pyreadstat # pandas.read_spss | |||
- pyreadstat # pandas.read_spss |
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.
Can you revert this change here please. After that, you should run ./scripts/generate_pip_deps_from_conda.py
so requirements.txt
is synchronized with the changes here.
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.
Sure, I will rebase my branch from master and that should be reverted
environment.yml
Outdated
@@ -14,6 +14,8 @@ dependencies: | |||
|
|||
# building | |||
- cython>=0.28.2 | |||
- cxx-compiler | |||
- zlib |
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.
can you add a short description why those are needed
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.
Sure! I will add the explanation, actually the zlib
we can remove since it is already a dependency of other packages
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 also think that the conda-forge
channel should be prioritized by the defaults
since not all of the packages are present on the default channel and the project is using the missing packages from conda-forge
, you might see some problems in the future (unlikely) but it is better to avoid any kind of problem
But I can create another PR for that
environment.yml
Hello @marcelotrevisani! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2019-07-02 07:38:21 UTC |
…he/bin/x86_64-conda_cos6-linux-gnu-cc compiler
I will squash my commits when it is ready to be integrated. |
No need to squash, we do that on merge. |
@marcelotrevisani is this still active? Can you merge master? |
Sure, during this weekend I will have some time and I am going to do it |
CCACHE=ccache | ||
echo "ccache: $CCACHE" | ||
export CC="ccache $CC" | ||
elif [ -z "$NOCACHE" ] && [ "${TRAVIS_OS_NAME}" == "osx" ]; 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.
Can this conditional branch be combined with the one above? Seems like mostly copy / paste save one off things so would be easier to read if consolidated
@marcelotrevisani can you rebase |
@marcelotrevisani we have had a fair amount of CI churn recently, so if you can merge master we can look again |
Nice PR but I think this has gone stale. @marcelotrevisani ping if you'd like to pick this back up |
Improvement to the conda environment to use the compiler from the virtual env instead of the system
Using the
cxx-compile
would be better because it will use the compiler from the virtual environment and it will not rely on the system anymore. That would be great to also avoid any kind of abi problems if someone uses some old compilergit diff upstream/master -u -- "*.py" | flake8 --diff