Task #2842
closedImprove Pulp PyPI packages
0%
Description
The current pulp packages in PyPI are not complete.
A MANIFEST.in[0] file needs to be added for all PyPI packages to include external files (license)
A README.rst should be added to all PyPI packages with a nicely formatted description of the package
Some packages requres a package_data[1] section in setup.py to include additional files installed in a package (config)
[0] https://packaging.python.org/tutorials/distributing-packages/#manifest-in
[1] https://packaging.python.org/tutorials/distributing-packages/#package-data
Updated by bmbouter over 7 years ago
+1 to config, license, and docs. We need to disinclude the systemd parts because that is OS specific, so we can't ship it with the pure Python code. I think the Ansible installer will allow the "right thing" to be done on all the different OS's. So I imagine #2840 will handle installing the systemd units.
Note that the develop install roles (not #2840) will still install the systemd unit files since the development OS is Fedora. I think they should do that if they don't already.
Updated by bmbouter over 7 years ago
Actually I'm not entirely sure how to ship the docs. Maybe we should leave those out for now too?
Updated by bizhang over 7 years ago
- Description updated (diff)
I've removed docs and systemd.
There are examples of including docs in the MANIFEST.in file [0], but I am not sure if this should be done for pulp.
[0] http://python-packaging.readthedocs.io/en/latest/non-code-files.html
Updated by bmbouter over 7 years ago
I don't have much experience with this, but from reading the docs, if we include them in MANIFEST.in they will install in the package's folder in site-packages. That would make that server.yaml file to install in /usr/lib/python3.5/site-packages/pulp/server.yaml
.
Is there any way for us to specify that it live somewhere else in the filesystem?
Updated by bizhang over 7 years ago
That can be done with the data_files option in setup.py [0] However if we were to install it directly to /etc/pulp/server.yaml pip install would require sudo permissions.
I was thinking that if we include it in the MANIFEST.in the user would install it to {venv}/usr/lib/python3.5/site-packages/pulpcore/server.yaml
they can set a environmental variable to read it from there [1]
[0] https://packaging.python.org/tutorials/distributing-packages/#data-files
[1] https://pulp.plan.io/issues/2833
Updated by bizhang over 7 years ago
The config file should be included in the package_data instead of the MANIFEST.in since it should be included in the package and not just source distribution.
Updated by bmbouter over 7 years ago
- Groomed changed from No to Yes
Thanks bizhang. Having it install in the python package root for pulp sounds fine. It's so cross platform! Thank you for writing this all up.
Updated by bizhang over 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bizhang
Updated by bizhang over 7 years ago
PR for core, common, and plugin: https://github.com/pulp/pulp/pull/3070/
Added by werwty over 7 years ago
Added by werwty over 7 years ago
Revision b4d81a1e | View on GitHub
Update location of etc/pulp/server.yaml
Updated by bizhang over 7 years ago
- Status changed from ASSIGNED to POST
Added by werwty over 7 years ago
Revision 48bcb137 | View on GitHub
improvements to the pulpcore packages
Added by werwty over 7 years ago
Revision 48bcb137 | View on GitHub
improvements to the pulpcore packages
Updated by bizhang over 7 years ago
- Status changed from POST to MODIFIED
I updated the pulpcore, pulpcore-common, pulpcore-plugin, and pulp_file packages. The rest are not currently built for pypi yet and should be done at a later date.
Updated by bmbouter about 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Improve PyPI Packaging
re #2842 https://pulp.plan.io/issues/2842