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

File pollution due to improper setup (i.e. the wheel installs files outside the module directory) #619

Open
denilsonsa opened this issue Feb 1, 2024 · 1 comment

Comments

@denilsonsa
Copy link

The current eyeD3 package installs a lot of (useless) files outside the module directory.

How to reproduce (1)

$ python -m venv .venv
$ source .venv/bin/activate
$ pip install requests
...
"requests" is just a random example module I wanted to install.
...
$ ls .venv/lib/python3.11/site-packages/

A bunch of directories, basically two directories per module, and not much else.
It looks quite clean.

$ pip install eyed3
...
$ ls .venv/lib/python3.11/site-packages/

OMG! What happened‽ These files showed up:

AUTHORS.rst
CONTRIBUTING.rst
HISTORY.rst
LICENSE
MANIFEST.in
Makefile
README.rst
poetry.lock
tox.ini

And these directories:

examples/
requirements/
tests/

$ pip uninstall eyed3

It lists all the files that are going to be removed.

How to reproduce (2)

  1. Go to https://pypi.org/project/eyed3/#files
  2. Download the eyed3-0.9.7-py3-none-any.whl wheel file.
  3. Inspect that file (it's just a zip file with a different extension).

Problem: there are many files outside the module directory.

Comparison

Take a look at the included files from the debian packages:

Those are very clean, no extraneous files being installed out-of-place.

Solution

You have to fix pyproject.toml.

You can also reorganize the project, moving all the source files under src/. That's a convention followed by setuptools, and I'm not sure about poetry.

@denilsonsa
Copy link
Author

After I wrote all of that and did all the investigation, I found a duplicate issue: #588.

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

1 participant