-
Notifications
You must be signed in to change notification settings - Fork 31
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
Standardize packaging system #80
base: master
Are you sure you want to change the base?
Conversation
@leforestier sorry for the delay, here's the PR. |
Hello Derek, |
@leforestier heya, thanks. let me give it a try. we certainly don't want to break it for people using a manual install from source (and have it scripted). my only counterpoint would be that those scripts as entry points (i.e. the python setup.py method) would be very old, and deprecated at this point (see: https://packaging.python.org/en/latest/discussions/setup-py-deprecated/#) nothing has really changed other than the invocation command being But, it doesn't hurt to try. I will reincorporate setup.py to the repository and see if both files can live in harmony :) EDIT: seems like some metadata fields in setup.py override pyproject.toml -- however, a blank setup.py seems to work. I am met with this error in Python 3.11+ however:
|
I'm going to look into this setup.py issue as soon as I have a bit of time, and if can't be solved better than this, I think I will just merge your pull request as is. |
In other projects I have this small setup.py:
Maybe try to just add that? |
@@ -0,0 +1,49 @@ | |||
[build-system] | |||
requires = ["setuptools"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requires = ["setuptools"] | |
requires = ["setuptools", "wheel"] |
If you add the wheel
directive here, a pure Python wheel will also be generated during the build phase. This wheel can be useful for compatibility with some Python environments, e.g., Pyodide
authors = [ | ||
{name = "Benjamin Le Forestier", email = "benjamin@leforestier.org"}, | ||
] | ||
version = "1.15.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can avoid duplicating the version here by substituting this line with
dynamic = ["version"]
and adding the following at the bottom of the file
[tool.setuptools.dynamic]
version = {attr = "yattag.__version__"}
Thanks for your advice, Glass. By the way, I was wondering in what environment you got a warning/deprecation message by installing yattag? |
Hi @leforestier, |
Convert this project to use a more standard method of installation (pyproject.toml). This enables setup tools to be used on the backend, and have metadata configured via a .toml frontend.
While setup.py is not fully deprecated for the time being, convert the current setup.py project structure to include a pyproject.toml to prevent any deprecation (as demonstrated by this [guide] (https://packaging.python.org/en/latest/guides/modernize-setup-py-project/#modernize-setup-py-project)).
This will also allow for installation locally using
pip install .
and editable install usingpip install -e .
Solves #79