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

Packaging without setup.py/setuptools #66

Open
jayvdb opened this issue Jan 16, 2019 · 2 comments
Open

Packaging without setup.py/setuptools #66

jayvdb opened this issue Jan 16, 2019 · 2 comments

Comments

@jayvdb
Copy link
Member

jayvdb commented Jan 16, 2019

setuptools is rarely needed, but it is nearly always used, creating an enormous risk of breakage for so many packages.

See https://stackoverflow.com/questions/25337706/setuptools-vs-distutils-why-is-distutils-still-a-thing

Installing without setup.py/setuptools wont be suitable for many projects repositories, but it will fill a niche that is increasingly being de-supported, which is whenever setuptools and friends no longer support a package, and embedded environments needing minimal size installs, and wanting to avoid setuptools/pip/etc which are quite large -- e.g. dockers where size does matter.

However the main one which I have recently been re-acquainted with is rpm builds, where the built package will be installed without setuptools, and currently setuptools is used as a build dependency only to generate the files needed.

For the vast majority of packages, setuptools could be replaced with a moban yaml file (maintained by the packager, outside the source repo) which defines the desired distro layout.

#64 is one setuptools-less installation method, using a toml file instead of a yaml file.

Quite often the additional steps performed in setup.py are not actually wanted by packagers, because they have their own way of providing dependencies, and different ways of creating and installing man pages, etc.

But if a packager does need additional steps done in setup.py, they could use pypi-mobans to generate a new setup.py which they control, using distutils (reduced risk), or even with setuptools which pypi-mobans already supports, so it only does the bits they want.

Some simple steps towards this would be to add fallbacks to distutils where possible.

@chfw
Copy link
Member

chfw commented Jan 16, 2019

This is a detailed explanation why distutils is seen in somesetup.py as a fallback.

@jayvdb
Copy link
Member Author

jayvdb commented Jan 17, 2019

An example of why packagers would benefit from being able to easily use a non-setup.py install , or overwrite setup.py with a simplified/maintained logic - thoughtnirvana/slimish-jinja2#4

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

2 participants