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

Relying on now-deprecated APIs in setuptools/NumPy #29

Open
RhysU opened this issue Dec 20, 2024 · 0 comments
Open

Relying on now-deprecated APIs in setuptools/NumPy #29

RhysU opened this issue Dec 20, 2024 · 0 comments

Comments

@RhysU
Copy link
Owner

RhysU commented Dec 20, 2024

Someone noticed the following sea of deprecation issues:

$ PYTHON=python3 make ar.so
python3 setup.py build_ext --inplace
/usr/lib/python3/dist-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
  warnings.warn(
/home/rhys/Build/ar/.eggs/setuptools_scm-8.1.0-py3.10.egg/setuptools_scm/_integration/setuptools.py:31: RuntimeWarning: 
ERROR: setuptools==59.6.0 is used in combination with setuptools_scm>=8.x

Your build configuration is incomplete and previously worked by accident!
setuptools_scm requires setuptools>=61

Suggested workaround if applicable:
 - migrating from the deprecated setup_requires mechanism to pep517/518
   and using a pyproject.toml to declare build dependencies
   which are reliably pre-installed before running the build tools

  warnings.warn(
[12/20/24 07:51:49] WARNING  toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'                                                                    pyproject_reading.py:42
                             Traceback (most recent call last):                                                                                                                                             
                               File "/home/rhys/Build/ar/.eggs/setuptools_scm-8.1.0-py3.10.egg/setuptools_scm/_integration/pyproject_reading.py", line 36, in read_pyproject                                
                                 section = defn.get("tool", {})[tool_name]                                                                                                                                  
                             KeyError: 'setuptools_scm'                                                                                                                                                     
running build_ext
building 'ar' extension
Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules winreg, win32api or win32con are installed.
C compiler: x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC

creating build
creating build/temp.linux-x86_64-3.10
compile options: '-I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/python3.10 -c'
x86_64-linux-gnu-gcc: ar-python.cpp
In file included from /usr/lib/python3/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1969,
                 from /usr/lib/python3/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/lib/python3/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from ar-python.cpp:8:
/usr/lib/python3/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
creating build/lib.linux-x86_64-3.10
x86_64-linux-gnu-g++ -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 -Wl,-Bsymbolic-functions -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.10/ar-python.o -o build/lib.linux-x86_64-3.10/ar.cpython-310-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.10/ar.cpython-310-x86_64-linux-gnu.so -> 

Some of them may just be my weird setup. But the NumPy one definitely merits a code chage.

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

No branches or pull requests

1 participant