-
Notifications
You must be signed in to change notification settings - Fork 1
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 issues #1
Comments
Thanks very much! If all issues where like this I would have not much to do anymore 😉 |
That's the nice thing with free software. You don't always have to do everything yourself 😃 |
After reading thought https://packaging.python.org and https://docs.python.org/3/distutils/ again, I decided to continue using the `find_packages` helper function because this make copy and paste easier when I decide to reuse this little project as a template for the next Python project. But ensure that Python packages like tests and docs are not installed by excluding them. It is directly used from the example given here: https://packaging.python.org/distributing/#packages Also add `package_data` to ensure that the Jinja2 templates of the package are included. Now only the "yaml4rst" package is installed which can be quickly verified by `pip3 uninstall yaml4rst`: ``` Uninstalling yaml4rst: /usr/local/lib/python3.5/dist-packages/yaml4rst-0.1.1.dist-info/DESCRIPTION.rst /usr/local/lib/python3.5/dist-packages/yaml4rst-0.1.1.dist-info/METADATA /usr/local/lib/python3.5/dist-packages/yaml4rst-0.1.1.dist-info/RECORD /usr/local/lib/python3.5/dist-packages/yaml4rst-0.1.1.dist-info/WHEEL /usr/local/lib/python3.5/dist-packages/yaml4rst-0.1.1.dist-info/entry_points.txt /usr/local/lib/python3.5/dist-packages/yaml4rst-0.1.1.dist-info/metadata.json /usr/local/lib/python3.5/dist-packages/yaml4rst-0.1.1.dist-info/top_level.txt /usr/local/lib/python3.5/dist-packages/yaml4rst/__init__.py /usr/local/lib/python3.5/dist-packages/yaml4rst/__pycache__/__init__.cpython-35.pyc /usr/local/lib/python3.5/dist-packages/yaml4rst/__pycache__/_meta.cpython-35.pyc /usr/local/lib/python3.5/dist-packages/yaml4rst/__pycache__/cli.cpython-35.pyc /usr/local/lib/python3.5/dist-packages/yaml4rst/__pycache__/defaults.cpython-35.pyc /usr/local/lib/python3.5/dist-packages/yaml4rst/__pycache__/helpers.cpython-35.pyc /usr/local/lib/python3.5/dist-packages/yaml4rst/__pycache__/reformatter.cpython-35.pyc /usr/local/lib/python3.5/dist-packages/yaml4rst/_meta.py /usr/local/lib/python3.5/dist-packages/yaml4rst/cli.py /usr/local/lib/python3.5/dist-packages/yaml4rst/defaults.py /usr/local/lib/python3.5/dist-packages/yaml4rst/helpers.py /usr/local/lib/python3.5/dist-packages/yaml4rst/reformatter.py ``` Related to: #1 Thanks to: @ganto
@ganto I checked the docs again and fixed the packaging based on our suggestions. Thanks again! Should be fixed in master. Can you retry before I make the release? |
OK, great. Thanks for looking into it. It's kind of late now. I'll test it tomorrow evening.
|
I tested the new However, the template file is still missing 😞 Btw. I also cannot identify it in your |
There are quite a few approaches to try to make setuptools more smart things like `include_package_data` or writing a small function which returns the files. But for once, lets not over-engineer it here and just list the paths manually. Fixes the issue of the missing template as verifiable by: unzip -v dist/yaml4rst-0.1.1-py3-none-any.whl ``` Archive: dist/yaml4rst-0.1.1-py3-none-any.whl Length Method Size Cmpr Date Time CRC-32 Name -------- ------ ------- ---- ---------- ----- -------- ---- 2467 Defl:N 755 69% 2016-11-05 17:55 405770e3 yaml4rst/helpers.py 499 Defl:N 314 37% 2016-11-05 17:55 7c0ad5d7 yaml4rst/defaults.py 34464 Defl:N 7289 79% 2016-11-05 18:57 dc492b1c yaml4rst/reformatter.py 233 Defl:N 150 36% 2016-11-05 17:55 b126375d yaml4rst/__init__.py 957 Defl:N 545 43% 2016-11-05 19:04 dab9ef7a yaml4rst/_meta.py 4758 Defl:N 1601 66% 2016-11-18 00:03 bf1b38d7 yaml4rst/cli.py 266 Defl:N 176 34% 2016-11-05 17:55 9f7fe2b5 yaml4rst/templates/debops/ansible/defaults_header.j2 4580 Defl:N 1826 60% 2016-11-18 20:53 244ff541 yaml4rst-0.1.1.dist-info/DESCRIPTION.rst 48 Defl:N 43 10% 2016-11-18 20:53 04447e33 yaml4rst-0.1.1.dist-info/entry_points.txt 1516 Defl:N 725 52% 2016-11-18 20:53 85946fec yaml4rst-0.1.1.dist-info/metadata.json 9 Defl:N 11 -22% 2016-11-18 20:53 5bb9d6b5 yaml4rst-0.1.1.dist-info/top_level.txt 92 Defl:N 92 0% 2016-11-18 20:53 4311f75b yaml4rst-0.1.1.dist-info/WHEEL 6041 Defl:N 2265 63% 2016-11-18 20:53 315b7eb5 yaml4rst-0.1.1.dist-info/METADATA 1165 Defl:N 707 39% 2016-11-18 20:53 9df2d361 yaml4rst-0.1.1.dist-info/RECORD -------- ------- --- ------- 57095 16499 71% 14 files ``` Related to: #1
Thanks for testing. You are right, I missed that. I was aware that |
ok, looks good now 👍 |
All right 😉 I made a new release. Feel free to report any further issues. |
I wrote a Gentoo ebuild for yaml4rst. However, I'm experiencing multiple issues with the default
setup.py
shipped with this project:distutils-r1
eclass:I could fix this error with the following patch:
I don't know setuptools so well to know what exactly is misbehaving here. Just wanted to let you know my issues.
Btw. I'm using the currently Gentoo stable
dev-python/setuptools-20.6.7
.The text was updated successfully, but these errors were encountered: