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

Remove setuptools<64 restriction #2180

Merged
merged 4 commits into from
Nov 3, 2023
Merged

Remove setuptools<64 restriction #2180

merged 4 commits into from
Nov 3, 2023

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Oct 23, 2023

We had to require setuptools<64 because it change its temporary build directory from a known path to a randomly named temporary directory. However, setuptools<64 doesn't work with for Python3.12 (#2179). Therefore, this adds an option to change the setuptools temporary build directory, so we have those temp files in a known path for coverage analysis. Not meant to be used by users.

@dweindl dweindl requested a review from a team as a code owner October 23, 2023 08:58
@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Merging #2180 (ed7d95b) into develop (71295a5) will decrease coverage by 0.03%.
The diff coverage is 75.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2180      +/-   ##
===========================================
- Coverage    76.59%   76.57%   -0.03%     
===========================================
  Files           82       82              
  Lines        15000    15004       +4     
===========================================
  Hits         11489    11489              
- Misses        3511     3515       +4     
Flag Coverage Δ
cpp 73.47% <ø> (-0.04%) ⬇️
petab 53.84% <75.00%> (+0.01%) ⬆️
python 77.17% <75.00%> (-0.01%) ⬇️
sbmlsuite ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
python/sdist/amici/custom_commands.py 53.52% <75.00%> (+1.28%) ⬆️

... and 1 file with indirect coverage changes

@dweindl
Copy link
Member Author

dweindl commented Oct 25, 2023

I can't recall why setuptools<64 was required

It seems it was due to a change in temporary build directories.

Previously:

2023-10-18T12:19:58.7269605Z     ------------------------------ amici ------------------------------
[...]
2023-10-18T12:19:59.6076474Z     -- CMAKE_BINARY_DIR: /home/runner/work/AMICI/AMICI/python/sdist/build/temp.linux-x86_64-cpython-39_amici
[...]
2023-10-18T14:30:11.1974396Z Capturing coverage data from /home/runner/work/AMICI/AMICI/build/CMakeFiles/amici.dir/src
[...]
2023-10-18T14:30:11.8773007Z Found 27 data files in /home/runner/work/AMICI/AMICI/build/CMakeFiles/amici.dir/src

Now:

2023-10-25T06:09:27.3351669Z   ------------------------------ amici ------------------------------
[...]
2023-10-25T06:09:28.0908333Z   -- CMAKE_BINARY_DIR: /tmp/tmpbis_04q_.build-temp_amici
[...]
2023-10-25T07:57:32.0670887Z Capturing coverage data from /home/runner/work/AMICI/AMICI/python/sdist/build/temp.linux-x86_64-cpython-39_amici/CMakeFiles/amici.dir/src
[...]
2023-10-25T07:57:32.1593636Z geninfo: ERROR: cannot read /home/runner/work/AMICI/AMICI/python/sdist/build/temp.linux-x86_64-cpython-39_amici/CMakeFiles/amici.dir/src!

Can we easily override the build directory? Needs further investigation...

cmake-build-extension bases its binary directory on the current working directory:
https://github.com/diegoferigo/cmake-build-extension/blob/b0425708e58360dd3c06e57acd81711161c70215/src/cmake_build_extension/build_extension.py#L198

-> check for pip/setuptools options

TODO: try https://stackoverflow.com/a/66163350

@dweindl dweindl removed the request for review from a team October 25, 2023 08:16
@dweindl dweindl marked this pull request as draft October 25, 2023 08:17
@dweindl dweindl marked this pull request as ready for review November 1, 2023 14:36
@dweindl dweindl mentioned this pull request Nov 1, 2023
2 tasks
@dweindl dweindl self-assigned this Nov 1, 2023
@dweindl dweindl merged commit 269910b into develop Nov 3, 2023
15 of 18 checks passed
@dweindl dweindl deleted the setuptools branch November 3, 2023 04:46
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.

2 participants