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

has_function broken when CCompiler.output_dir is set. #64

Closed
jaraco opened this issue Nov 6, 2021 · 6 comments · Fixed by #65
Closed

has_function broken when CCompiler.output_dir is set. #64

jaraco opened this issue Nov 6, 2021 · 6 comments · Fixed by #65

Comments

@jaraco
Copy link
Member

jaraco commented Nov 6, 2021

This has broken has_function when CCompiler.output_dir is set.

Originally posted by @mkoeppe in #31 (comment)

@mkoeppe
Copy link
Contributor

mkoeppe commented Nov 6, 2021

Thanks for opening the issue. We came across this in https://trac.sagemath.org/ticket/32828 (pyzmq fails to build when SETUPTOOLS_USE_DISTUTILS=local is in use).

@jaraco
Copy link
Member Author

jaraco commented Nov 7, 2021

I looked at the patch and read the problem description, but it's not obvious to me where the flaw is. Do you have any more detail (traceback, repro)?

I tried to reproduce it by building pyzmq, but it built fine:

$ $SETUPTOOLS_USE_DISTUTILS='local' pip-run --no-binary pyzmq pyzmq
Collecting pyzmq
  Downloading pyzmq-22.3.0.tar.gz (1.2 MB)
     |████████████████████████████████| 1.2 MB 5.9 MB/s            
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyzmq
  Building wheel for pyzmq (pyproject.toml) ... done
  Created wheel for pyzmq: filename=pyzmq-22.3.0-cp310-cp310-macosx_10_9_universal2.whl size=1398560 sha256=4fc39ea9b87811527d0a4646025fc45a95a12ba8ea17e9208a35b2c237f5424b
  Stored in directory: /Users/jaraco/Library/Caches/pip/wheels/5c/8a/96/75ce2fe82d6ff5907f6c409b4ee48b8e7876d56047f34aaafa
Successfully built pyzmq
Installing collected packages: pyzmq
Successfully installed pyzmq-22.3.0
Python 3.10.0 (v3.10.0:b494f5935c, Oct  4 2021, 14:59:20) [Clang 12.0.5 (clang-1205.0.22.11)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

@termim
Copy link
Contributor

termim commented Nov 7, 2021

It builds for me too - Python-3.8.11, setuptools-58.5.3, pyzmq-22.3 as well as current main branch.

@mkoeppe
Copy link
Contributor

mkoeppe commented Nov 7, 2021

I looked at the patch and read the problem description, but it's not obvious to me where the flaw is

The code is expecting that a.out is created in the current directory, which is not true if output_dir is set.

@mkoeppe
Copy link
Contributor

mkoeppe commented Nov 9, 2021

For context of how pyzmq provokes this error:
https://github.com/zeromq/pyzmq/blob/v22.3.0/buildutils/detect.py#L116

@mkoeppe
Copy link
Contributor

mkoeppe commented Nov 9, 2021

I've added a testcase in #65

@jaraco jaraco closed this as completed in #65 Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants