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

tests module is included in pypi package #76

Open
claudious96 opened this issue Sep 3, 2024 · 3 comments
Open

tests module is included in pypi package #76

claudious96 opened this issue Sep 3, 2024 · 3 comments
Assignees
Labels

Comments

@claudious96
Copy link

claudious96 commented Sep 3, 2024

Hi! First of all, thanks for the package, it's really useful for building documentation as readable documents.

I've encountered an issue when installing the package from pypi using pip, ot installs also a tests module, the one used to test this package.

This can be a problem since tests is usually the name of the local module/directory for testing (as it is for this package). In my case I wasn't able to do any import from my local tests directory as it was overridden by the tests package installed in the virtual environment.

Result of pip uninstall:

$ pip uninstall md2pdf                    
Found existing installation: md2pdf 1.0.1
Uninstalling md2pdf-1.0.1:
  Would remove:
    /home/claudious/.cache/pypoetry/virtualenvs/foo-4Z2l3Kb0-py3.11/bin/md2pdf
    /home/claudious/.cache/pypoetry/virtualenvs/foo-4Z2l3Kb0-py3.11/lib/python3.11/site-packages/md2pdf-1.0.1.dist-info/*
    /home/claudious/.cache/pypoetry/virtualenvs/foo-4Z2l3Kb0-py3.11/lib/python3.11/site-packages/md2pdf/*
    /home/claudious/.cache/pypoetry/virtualenvs/foo-4Z2l3Kb0-py3.11/lib/python3.11/site-packages/tests/*
Proceed (Y/n)? y
  Successfully uninstalled md2pdf-1.0.1

I've noticed it is already in the exclude section of pyproject.toml, I tried to build the package myself using poetry build but the result does not contain any tests directory. Therefore I don't have a suggestion on how to fix this.

Is it possible that you use a different tool or procedure when publishing to pypi?

@claudious96 claudious96 changed the title tests package is included in pypi wheel tests module is included in pypi wheel Sep 3, 2024
@claudious96 claudious96 changed the title tests module is included in pypi wheel tests module is included in pypi package Sep 3, 2024
@jmaupetit jmaupetit self-assigned this Sep 4, 2024
@jmaupetit jmaupetit added the bug label Sep 4, 2024
@pinkponk
Copy link

pinkponk commented Dec 9, 2024

Have the same problem

@pinkponk
Copy link

pinkponk commented Dec 9, 2024

solved this temporarly by manually installing md2pdf before my other packages:
poetry add git+https://github.com/jmaupetit/md2pdf.git

@claudious96
Copy link
Author

Are there any plans for releasing a new version with a patch for this?

I know there are workarounds so there's not really a hurry, just checking as it would be nice to get a new release with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants