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

Equivalent for distutils.ccompiler.new_compiler needed #4540

Open
rjungbeck opened this issue Aug 3, 2024 · 4 comments
Open

Equivalent for distutils.ccompiler.new_compiler needed #4540

rjungbeck opened this issue Aug 3, 2024 · 4 comments
Labels
distutils deprecation issues stemming from #4137 Needs Triage Issues that need to be evaluated for severity and status.

Comments

@rjungbeck
Copy link

setuptools version

Any version

Python version

Python 312

OS

Windows, Linux

Additional environment information

No response

Description

I use distutils ccompiler.new_compiler() to compile and link .c files (created via cython (with different, modue specific flags), obj files , .rc files, .res files and libraries in dynamic libraries or executables. I also do some (platform) specific changes to the compiler returned (like additional include or library paths, or compiler or linker flags).

By deprecating distutils you are removing this functionality (which does a pretty good job in abstracting different installastion scenarios (C compiler and SDK versions, installation locations, OS, Python versions).

NB: I create some modules automatically (with jinja2) and I want to do my own dependency management

How to Reproduce

Try to do it withot new_compiler()

Other detail

@rjungbeck rjungbeck added distutils deprecation issues stemming from #4137 Needs Triage Issues that need to be evaluated for severity and status. labels Aug 3, 2024
@jaraco
Copy link
Member

jaraco commented Aug 22, 2024

This might be a duplicate of #2806

@rjungbeck
Copy link
Author

I contrast to #2806 I need to access new_compiler from another script (ie not in the setup.py context).

I do not build a classic extension (.pyd) I build a complete exceutable on multiple platforms and combine this with compiling JavaScript/JSX with Vite and gzip, extracting text, that needs to be translated, building translation files, building and code signing an InnoSetup based compiler and scp to an external server,

@eli-schwartz
Copy link
Contributor

I do not build a classic extension (.pyd) I build a complete exceutable on multiple platforms and combine this with compiling JavaScript/JSX with Vite and gzip, extracting text, that needs to be translated, building translation files, building and code signing an InnoSetup based compiler and scp to an external server,

All this sounds like you want a real build system instead of setuptools...

@rjungbeck
Copy link
Author

I already have that build system (for my software) and just want to continue to use distutils/setuptools in it to compile & link the Cython code.
NB: I originally did the compilation and link step with my own code, but that is (especially with different Python versions, OS SDK platforms, compiler versions) quite complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distutils deprecation issues stemming from #4137 Needs Triage Issues that need to be evaluated for severity and status.
Projects
None yet
Development

No branches or pull requests

3 participants