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

Use pyproject.toml to enable building and installing from source #2651

Open
bkmgit opened this issue Nov 22, 2024 · 4 comments
Open

Use pyproject.toml to enable building and installing from source #2651

bkmgit opened this issue Nov 22, 2024 · 4 comments

Comments

@bkmgit
Copy link

bkmgit commented Nov 22, 2024

Operating system: Linux Mint Debian Edition 6
wxPython version & source: wxPython 4.2.2 Pypi
Python version & source: python 3.11 system

Description of the problem:

Get the following warning when building:

DEPRECATION: wxPython is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559

The current build uses setup.py which is deprecated. Would switching to using a pyproject.toml configuration be something that would be supported? There is an old pull request at here, but am happy to update this or make a new one if it would be examined.

@swt2c
Copy link
Collaborator

swt2c commented Jan 14, 2025

Yes, it's something that's desired. I've tried to work on it a little bit myself, but haven't gotten very far. I attempted to turn build.py into a PEP-517 build system, but ran into some conflicts with the build PyPI module...

Contributions are welcome.

@echoix
Copy link
Contributor

echoix commented Jan 14, 2025

Yes, it's something that's desired. I've tried to work on it a little bit myself, but haven't gotten very far. I attempted to turn build.py into a PEP-517 build system, but ran into some conflicts with the build PyPI module...

Contributions are welcome.

I've passed 3 days over the last two weekends on this. I didn't know you were open to changing up much of build.py. I was tuning up to make sure that I had only the minimal changes that I would be full certain that it wouldn't break with other invocations/ways of using it that I wasn't aware of.
I'm only one misplaced file away from having a first step ready. The wx.svg is misplaced in two folders in the build package.
Adding a pyproject.toml forces you to opt-in to a different behavior and different defaults that projects were supposed to be using already, so it is a kind of debt to fight against.

@swt2c
Copy link
Collaborator

swt2c commented Jan 14, 2025

Well, my attempts were also to change it very minimally. But looking forward to your change proposal, thanks a lot for working on that.

@echoix
Copy link
Contributor

echoix commented Jan 14, 2025

My non perfect (one folder layout changed) and non cleaned up run: https://github.com/echoix/Phoenix/actions/runs/12730449917

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