Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 464030 - distutils-r1 - esetup.py always passes "build" argument to setup.py, but this may mess up "install" options?
Summary: distutils-r1 - esetup.py always passes "build" argument to setup.py, but this...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-01 01:34 UTC by Sean Santos
Modified: 2013-10-19 08:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
pithos-0.3.17.ebuild (file_464030.txt,1.26 KB, text/plain)
2013-04-03 01:43 UTC, Sean Santos
Details
build.log (build.log,33.57 KB, text/plain)
2013-04-03 15:01 UTC, Sean Santos
Details
new pithos-0.3.17.ebuild (pithos-0.3.17.ebuild,1.13 KB, text/plain)
2013-04-03 15:06 UTC, Sean Santos
Details
Patch fixing the upstream issue (0001-Respect-build_dir-when-substituting-data-install-pat.patch,2.16 KB, patch)
2013-04-03 16:32 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Santos 2013-04-01 01:34:44 UTC
I've been messing around with an ebuild of Pithos using distutils-r1, and I noticed that there's a hard-coded installation directory being written on install that is no longer being set correctly. (The hard-coding is kind of a hack; basically "/usr/share/pithos" is being put into one of the site-packages files.)

I find that surrounding the section that adds these flags with "if [[ ! "${1}" == install ]]" fixes the problem.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-04-02 07:47:59 UTC
It's necessary for 'install' or otherwise distutils won't be able to find the built files and will build again. Please paste the ebuild you're having problem with.
Comment 2 Sean Santos 2013-04-03 01:43:35 UTC
Created attachment 344134 [details]
pithos-0.3.17.ebuild

The ebuild in question. Adapted from pithos-9999.ebuild in sunrise.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-04-03 08:12:57 UTC
(In reply to comment #2)
> Created attachment 344134 [details]
> pithos-0.3.17.ebuild
> 
> The ebuild in question. Adapted from pithos-9999.ebuild in sunrise.

1) please use python_configure_all() for the export,

2) please use [${PYTHON_USEDEP}] on Python dependencies.

Other than that, I don't see anything problematic in the ebuild itself. Build log?
Comment 4 Sean Santos 2013-04-03 15:01:09 UTC
Created attachment 344248 [details]
build.log

The build log in question. I don't see anything too surprising, though it does show the setup.py command. The problem is not apparent until you actually try to run Pithos afterward.

If it helps, here is the setup.py for Pithos (at this tag); it's short.

https://github.com/kevinmehall/pithos/blob/07dcbd86a1db202122795dd55a91d230bd63f5bb/setup.py

You can see that it's a DistUtilsExtra build and the "InstallAndUpdateDataDirectory" class is supposed to call the function that updates the path in pithosconfig.py.
Comment 5 Sean Santos 2013-04-03 15:06:05 UTC
Created attachment 344250 [details]
new pithos-0.3.17.ebuild

Not directly relevant, but here's a new ebuild with the aforementioned changes. Some of the dependencies don't have the flags in the stable versions, so it needs some versions from testing now.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-04-03 16:14:53 UTC
That's not really problem with 'build' command but with setup.py failing to properly use build_dir. The substitution should be performed on the copy of sources copied to 'build' (--build-lib, to be more exact) which will be installed in the system, and not to the local one.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-04-03 16:32:35 UTC
Created attachment 344262 [details, diff]
Patch fixing the upstream issue

Could you test this patch, please? If it's fine, I'll send a pull request to upstream right away.

Alternative, you can use my github fork to test it:

  https://github.com/mgorny/pithos
Comment 8 Sean Santos 2013-04-04 03:06:27 UTC
This works fine for me. Thanks for your assistance and for clearing this up!
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-19 08:57:22 UTC
We no longer pass 'build' arguments, so we can close this is really FIXED.