Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 535714 - distutils-r1 can fail with setup.cfg files
Summary: distutils-r1 can fail with setup.cfg files
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-05 20:28 UTC by Robin Johnson
Modified: 2018-12-30 11:30 UTC (History)
2 users (show)

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


Attachments
distutils-r1.eclass.patch (distutils-r1.eclass.patch,441 bytes, patch)
2018-12-30 11:30 UTC, Fabio Rossi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2015-01-05 20:28:39 UTC
Have a trivial ebuild:
--------- pyrtm-0.4.2.ebuild
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header$

EAPI="5"
PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} pypy )

inherit distutils-r1

DESCRIPTION="Remember The Milk API"
HOMEPAGE="https://pypi.python.org/pypi/pyrtm/ http://bitbucket.org/srid/pyrtm/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.bz2"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
---------

There is a catch:
The distfile contains a setup.cfg that confuses setuptools, causing a failure.

--------- setup.cfg
[build]
build-base = _build

[sdist]
formats = bztar

[egg_info]
tag_build = 
tag_date = 0
tag_svn_revision = 0
---------

Simply removing this setup.cfg leads to the compile phase completing.

--------- failure log

>>> Compiling source in /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2 ...
 * python3_3: running distutils-r1_run_phase distutils-r1_python_compile
/usr/bin/python3.3 setup.py build
running build
running build_py
creating /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/lib
creating /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/lib/rtm
copying src/rtm/rtm.py -> /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/lib/rtm
copying src/rtm/__init__.py -> /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/lib/rtm
copying src/rtm/consts.py -> /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/lib/rtm
creating /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/lib/rtm/samples
copying src/rtm/samples/__init__.py -> /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/lib/rtm/samples
copying src/rtm/samples/app.py -> /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/lib/rtm/samples
running egg_info
writing /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/pyrtm.egg-info/PKG-INFO
writing dependency_links to /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/pyrtm.egg-info/dependency_links.txt
writing entry points to /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/pyrtm.egg-info/entry_points.txt
writing top-level names to /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/pyrtm.egg-info/top_level.txt
writing requirements to /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/pyrtm.egg-info/requires.txt
reading manifest file '/dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/pyrtm.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file '/dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/pyrtm.egg-info/SOURCES.txt'
error: Error: setup script specifies an absolute path:

    /dev/shm/portage/dev-python/pyrtm-0.4.2/work/pyrtm-0.4.2-python3_3/pyrtm.egg-info/SOURCES.txt

setup() arguments must *always* be /-separated paths relative to the
setup.py directory, *never* absolute paths.

 * ERROR: dev-python/pyrtm-0.4.2::usr-local failed (compile phase):
 *   (no error message)
 * 
---------
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-25 08:23:46 UTC
Apparently there has been no more reports, so I'm afraid attempting to solve this in a generic way is not worth the effort.  As you said, you can remove the file (or just patch it).
Comment 2 Fabio Rossi 2018-12-30 11:30:23 UTC
what about inserting a notice in the eclass to speed-up debugging for ebuild writers?
Comment 3 Fabio Rossi 2018-12-30 11:30:56 UTC
Created attachment 558984 [details, diff]
distutils-r1.eclass.patch