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

Get DLL as part of a build, instead of on every run of setup.py #13

Open
pradyunsg opened this issue Mar 14, 2022 · 3 comments
Open

Get DLL as part of a build, instead of on every run of setup.py #13

pradyunsg opened this issue Mar 14, 2022 · 3 comments

Comments

@pradyunsg
Copy link

This would make the pip installation faster, since the getDLLs calls would not happen when pip calls setup.py egg_info.

@pradyunsg
Copy link
Author

pysdl2-dll/setup.py

Lines 10 to 14 in 0c1bb02

# Get the necessary SDL2 DLLs for the platform
override = os.getenv('SDL2DLL_PLATFORM')
platform = get_platform() if not override else override
getDLLs(platform)

This should mostly be a matter of moving this logic to happen in the bdist_wheel or build command from setuptools, instead of happening at the top level in setup.py.

@a-hurst
Copy link
Owner

a-hurst commented Mar 16, 2022

This should mostly be a matter of moving this logic to happen in the bdist_wheel or build command from setuptools

I didn't know this was possible, thanks! Could you point me to the relevant setuptools documentation? I tried searching for it myself, but the API documentation for build and bdist_wheel seem to come up blank: https://setuptools.pypa.io/en/latest/deprecated/distutils/apiref.html#module-distutils.command.build

@C0rn3j
Copy link

C0rn3j commented Dec 24, 2024

On the note of setup.py/building, the build system should be using pyproject.toml nowadays.

I am not sure if the build system will be up for completely migrating your current setup.py to it, but it should at least be mostly possible.

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

3 participants