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

Replace setup.py with pyproject.toml #17

Closed
mdklatt opened this issue May 15, 2023 · 4 comments
Closed

Replace setup.py with pyproject.toml #17

mdklatt opened this issue May 15, 2023 · 4 comments
Assignees

Comments

@mdklatt
Copy link
Owner

mdklatt commented May 15, 2023

The use of setup.py is deprecated, and a pyproject.toml file should be used instead. See serial-core v0.9.0 as an example.

@mdklatt mdklatt self-assigned this May 15, 2023
@mdklatt
Copy link
Owner Author

mdklatt commented Jun 17, 2023

In the current implementation, the template application's top-level etc/ directory is for configuration files and other user-editable assets. The data_files directive in setup.py is used to install this directory to the application install root. This directive is deprecated in Setuptools and has no comparable alternative. The recommended replacement is to use package data, but internal package data is not suitable for user-facing assets.

Using an external tool seems to be the only option to install files external to the wheel/package.

@mdklatt
Copy link
Owner Author

mdklatt commented Jun 17, 2023

Commit ac01709 replaces setup.py with pyproject.toml, but the etc/ directory now has to be installed manually. The installation process depends on the installation target (virtualenv, Docker image, etc.), which is outside the scope of this template.

@mdklatt
Copy link
Owner Author

mdklatt commented Jun 17, 2023

The pyproject.toml file and related standards has improved the packaging and distribution of Python libraries, but has done nothing for applications (it has arguably made it worse). See, for example, this request for data_files support in Poetry for a discussion of the issues around installing external data files along with a Python application.

Installation is a such a multi-faceted problem that it cannot be captured in this template without making a lot of assumptions. So, the final decision about how to handle the etc/ directory during installation will be left to the user.

@mdklatt
Copy link
Owner Author

mdklatt commented Jun 19, 2023

Issue resolved by commit d5afdf6.

@mdklatt mdklatt closed this as completed Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant