Project

Profile

Help

Story #278

Story #3092: As a packager, I have a Pulp packaging guide

Add documentation about Pulp's setup.py requirements

Added by rbarlow over 4 years ago. Updated 6 months ago.

Status:
NEW
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
No
Tags:
Documentation
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

Description

This issue is limited in scope to platform only. We'll need additional, similar tickets for plugins.

When pip installing our various Pulp packages, the dependencies do not get automatically installed. setuptools has a way to express dependencies so that when users pip install packages their dependencies are also automatically pulled in0.

If this is working you should be able to:
0. Ensure that Pulp's Python based dependencies are not installed on your machine (neither via pip or yum).
1. locally install all setup.py files contained in the pulp repo1 using python setup.py install

For Pulp3 I think this is mostly already in-progress2 so really this story is about adding docs indicating listing requirements is a requirement for Pulp's python packages.

[0] http://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-dependencies
[1]: https://github.com/pulp/pulp/
[2]: https://github.com/pulp/pulp/blob/d03d73c9714aa4c21c296b3749c929f688ea2f89/app/setup.py#L3-L14


Checklist


Related issues

Related to Pulp - Story #2444: Create a PyPI account for Pulp3 core and all plugins MODIFIED Actions
Related to Pulp - Task #2463: Reorganize 3.0-dev branch MODIFIED Actions

Associated revisions

Revision 31201f7c View on GitHub
Added by rbarlow over 4 years ago

Add install_requires arguments to our setup.py files.

This commit also removes some incorrect Requires lines in our spec file, and adds
python-gofer-qpid to our server qpid group.

https://pulp.plan.io/issues/278

re #278

Revision 31201f7c View on GitHub
Added by rbarlow over 4 years ago

Add install_requires arguments to our setup.py files.

This commit also removes some incorrect Requires lines in our spec file, and adds
python-gofer-qpid to our server qpid group.

https://pulp.plan.io/issues/278

re #278

Revision 31201f7c View on GitHub
Added by rbarlow over 4 years ago

Add install_requires arguments to our setup.py files.

This commit also removes some incorrect Requires lines in our spec file, and adds
python-gofer-qpid to our server qpid group.

https://pulp.plan.io/issues/278

re #278

History

#1 Updated by rbarlow over 4 years ago

I submitted a PR that does this for the platform:

https://github.com/pulp/pulp/pull/1662

However, I'm leaving this bug as NEW since we need to also do this for our plugins.

#2 Updated by rbarlow over 4 years ago

  • Subject changed from [RFE] All setup.py files should reference their dependencies so users can pip install Pulp packages to All setup.py files should reference their dependencies so users can pip install Pulp packages

#3 Updated by bmbouter almost 3 years ago

  • Checklist item Add documentation about Pulp's setup.py package requirements added
  • Description updated (diff)
  • Sprint Candidate changed from No to Yes
  • Tags Documentation, Pulp 3 added

I'm marking this as Pulp3 since practically speaking the python package layout is changing considerably with pulp3.

#4 Updated by bmbouter almost 3 years ago

  • Related to Story #2444: Create a PyPI account for Pulp3 core and all plugins added

#5 Updated by bmbouter almost 3 years ago

  • Checklist item Ensure that for Pulp3 all Python packages have a setup.py added
  • Subject changed from All setup.py files should reference their dependencies so users can pip install Pulp packages to All setup.py files are present and should reference their dependencies so users can pip install Pulp packages

#6 Updated by bmbouter almost 3 years ago

  • Checklist item consolidate all setup.py files into exactly 1 that lives in the root added
  • Tags deleted (Documentation)

After a bit of research, I'm convinced that our current path is going to lead to issues later. We have a lot of setup.py files and this is going to be a problem when we go to publish on PyPI since each setup.py will be its own python package. These will all have to be published and also pip installing from a url will become pip installing from a bunch of urls. I don't know of a good reason to motivate this structure.

I believe we should have exactly 1 setup.py and it should be in the root. For example look at the way Django lays out their repository0.

Also the Django root is a lot cleaner than the pulp root. We could have a 'pulp' folder with all of the subpackages that live at pulp.<packagehere> as subfolders of Pulp. This would both clean up the root and reduce the depth of the folder tree. We should probably file this as a separate task though.

I'm removing the documentation tag since this is a lot more than docs.

[0]: https://github.com/django/django

#7 Updated by semyers almost 3 years ago

Yes, please let's do this. We do want some separation; my current expectation is that there will be a "pulp" package containing pulp.app, pulp.exceptions, and pulp.tasking. Then I assume we'll want to have separate packages for pulp.common and pulp.whateverwenametheclientlib.

#8 Updated by bmbouter almost 3 years ago

  • Checklist item deleted (Ensure that for Pulp3 all Python packages have a setup.py)
  • Checklist item deleted (consolidate all setup.py files into exactly 1 that lives in the root)
  • Checklist item changed from Add documentation about Pulp's setup.py package requirements to Add documentation about Pulp's setup.py package requirements (see comment 8 for details))
  • Subject changed from All setup.py files are present and should reference their dependencies so users can pip install Pulp packages to Add documentation about Pulp's setup.py requirements
  • Tags Documentation added

This issue is being purposed to capture the setup.py requirements going forward. The consolidation and reorganization is being created as a separate issue.

The documentation requirements should include:
  • That Python requirements be expressed in the setup.py
  • That one setup.py exists for the entire pulp package, but two additional setup.py files are needed. One for pulp.common and another for the pulp CLI.

#9 Updated by bmbouter almost 3 years ago

  • Related to Task #2463: Reorganize 3.0-dev branch added

#10 Updated by dkliban@redhat.com almost 3 years ago

Where is this documentation going to live?

#11 Updated by bmbouter almost 3 years ago

wrote:

Where is this documentation going to live?

That is a good question. Really this is about cross-platform distribution, so perhaps we could create a section at (docs/contributing/cross_platform.rst). It maybe could live as a paragraph in the build docs, but that probably should be reserved for docs on how to build.

What do you think?

#12 Updated by dkliban@redhat.com almost 3 years ago

This documentation is about packaging. So I think it would be more appropriate for it to live in the Build guide0

[0] http://docs.pulpproject.org/en/3.0/nightly/contributing/build_guide.html

#13 Updated by bmbouter almost 3 years ago

@dkliban That is good reasoning and I agree w/ you. I would like to hear from @smyers some on this too before we go forward.

#14 Updated by semyers almost 3 years ago

I'm still not sure, so for now I'll defer to putting it in the build guide for lack of a better idea. :)

#15 Updated by bmbouter almost 3 years ago

  • Checklist item changed from Add documentation about Pulp's setup.py package requirements (see comment 8 for details)) to Add documentation to build guide (docs/contributing/build_guide.rst) about Pulp's setup.py package requirements (see comment 8 for details))

Revised the checklist item based on discussion.

#16 Updated by dkliban@redhat.com almost 3 years ago

  • Groomed changed from No to Yes

#17 Updated by rchan over 1 year ago

  • Sprint Candidate deleted (Yes)

#18 Updated by amacdona@redhat.com 11 months ago

  • Parent task set to #3092
  • Sprint Candidate set to No

#19 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF