[BUG] - Missing CHANGELOG.rst from packaged tar.gz
wibbit opened this issue · comments
Describe the bug
setup.py includes a dependency on CHANGELOG.rst which is not included in the .tar.gz packages
To Reproduce
Retrieve django-guid-.tar.gz and try to run setup.py
I've tested this on 1.1.1, 2.0.0 2.1.0 & 2.20
Full stack trace
[root@dev-rhel7-acme-python-django2-guid django-guid-2.2.0]# /opt/acme/bin/python3 setup.py install
Traceback (most recent call last):
File "setup.py", line 7, in
with open('CHANGELOG.rst') as changelog_file:
FileNotFoundError: [Errno 2] No such file or directory: 'CHANGELOG.rst'
Hi, thanks for reporting that. That's a bit annoying indeed.
There's three solutions to this:
- Use the wheel instead: https://pypi.org/project/django-guid/2.2.0/#files (Install with
pip install django_guid-2.2.0-py3-none-any.whl
) - Comment out the broken dependencies in
setup.py
manually - We backport a fix to
2.2
.
Obviously option 3 would be the best, but I haven't backported changes like this before, so I need time to investigate how to do it properly. I'll look into it this weekend if the other options are not sufficient for you.
Seems like this could be enough (since 3.x is a complete rewrite we won't need this in master):
- Checkout latest
2.2.0
release tag (I've done this) - Create new branch for
2.2
and push it (I've done this) - Create a
fix
-branch from the2.2
-branch and fix changes. - Submit PR from the
fix
into the2.2
-branch - Release a
2.2.1
from the2.2
branch.
Implemented said solution in #57, please have a look.
Looking else where, I think you'll want to include ALL files that are expected to be in the tar.gz
I found sckott/habanero@d1fa9a0 as an example
So I would assume you'd need to include the rest of the content.
PKG-INFO, demoproj/, django_guid/, django_guid.egg-info/, setup.cfg, setup.py & tests/
Sorry was intending to submit a PR (would have been my first), but you've most certainly beaten me to it!
That makes sense - I would love if you submit a PR! 😄 Mine was just a draft to test some and to get the discussion going 🎉 I'll close it in favor of yours, if you want to submit one.
Heyah
I've just re-looked at what you've done, I don't think I can add any more to it (especially with my lack of familiarity of python packaging!)
The only thing I saw complains about was the CHANGELOG.rst suggesting it's the only thing that needed fixing, so "include *.rst" should be more than sufficient.
Gotcha :) I can confirm it works to package it through setup.py
with the changes I've done in that MR. I'll push and release today or tomorrow. 🎉
Sorry, IRL stuff came up. I'll try to look into this today or tomorrow.
Backport released https://pypi.org/project/django-guid/2.2.1/