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

Move Python egg-info to top level directory #188

Closed
wants to merge 1 commit into from

Conversation

tiran
Copy link
Member

@tiran tiran commented Oct 26, 2016

All setup.py use the same build, dist and *.egg-info directory on top
level. Build artefacts are no longer placed in local build directories.

Signed-off-by: Christian Heimes cheimes@redhat.com

@tiran
Copy link
Member Author

tiran commented Oct 26, 2016

The PR will also simplifies @pspacek next branch a bit.

@tiran
Copy link
Member Author

tiran commented Oct 26, 2016

I ran into some issues with make rpm. setup.py started to pick up build artefacts of other packages. Now every package uses its own subdirectory under the top-level build directory.

@pspacek
Copy link
Contributor

pspacek commented Oct 27, 2016

Why this change? It goes against the usual behavior where build artifacts are placed in the same directory as sources. Also, I intend to support ouf-of-source-tree builds (aka VPATH) and I'm not sure it will work with your patch.

I would reject this change if there is no strong need.

@stlaz
Copy link
Contributor

stlaz commented Oct 27, 2016

+1 with @pspacek, build artefacts should be in the same directory as is their source. I would like to have them removed on make clean if that does not currently work.

@tiran tiran force-pushed the move_build_artefacts branch 2 times, most recently from a5c55c4 to 919b7e8 Compare October 27, 2016 10:20
The egg-info directories are now created in build root. For in-place
builds the build root is the project root. For out-of-tree builds it's
$(buildir)/build/../.., which is the same as $(top_builddir) for all
Python projects.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
@tiran tiran changed the title Move Python build artefacts to top level directory Move Python egg-info to top level directory Oct 27, 2016
@tiran
Copy link
Member Author

tiran commented Oct 27, 2016

I have changed the PR a bit

  • dist and build are no longer moved
  • as discussed on IRC freeipa.egg-info is now ipaserver.egg-info. pkg_resource assumes that a egg-info directory has the same prefix as a package directory.
  • I added a egg_info command plugin based on https://blog.kevin-brown.com/programming/2014/09/24/combining-autotools-and-setuptools.html . My variant uses the distutils API properly and corrects a bug with install_egg_info plugin.
  • ipasetup now calculates the package root path based on the path of setup.py. This should be enough to enable VPATH out-of-tree builds.
  • By default the egg-info directories are in the top-level project dir or on top_builddir. For in-tree tests the egg-info directories must be in sys.path in order to register entry points correctly, see PR Register entry points of Custodia plugins #187

@tiran
Copy link
Member Author

tiran commented Nov 9, 2016

I'm closing this PR because the issue can't be fixed w/o patching setuptools heavily. I got it mostly right except for SOURCES.txt. We need to revise the project structure at a later point.

@tiran tiran closed this Nov 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants