[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensuse-packaging
Subject:    Re: [opensuse-packaging] My first python singlespec effort
From:       Todd Rme <toddrme2178 () gmail ! com>
Date:       2017-05-03 21:26:04
Message-ID: CADb7s=tfjPBqSqkg-ZFC+aUBP7H4D6tz3vPzLMBRHxKZkjPyBQ () mail ! gmail ! com
[Download RAW message or body]

On Wed, May 3, 2017 at 5:20 PM, Todd Rme <toddrme2178@gmail.com> wrote:
> On Wed, May 3, 2017 at 4:19 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
> > I maintain numerous python packages, so I thought I give one a shot at
> > singlespec:
> > 
> > https://build.opensuse.org/package/show/home:gregfreemyer:Tools-for-forensic-boot-cd/python-bencode
> >  
> > The build is failing, even for factory which should have all the
> > needed dependencies. It says the failure is temporary, but it has been
> > over 12 hours and I suspect the problem is with my spec file.
> > 
> > Anyone know what I'm doing wrong?
> > 
> > https://build.opensuse.org/package/view_file/home:gregfreemyer:Tools-for-forensic-boot-cd/python-bencode/python-bencode.spec?expand=1
> >  
> > You can see in the log the python2 build works:
> > 
> > ===
> > [   33s] + echo python2
> > [   33s] + /usr/bin/python2 setup.py build '--executable=/usr/bin/python2 -s'
> > [   33s] running build
> > [   33s] running build_py
> > [   33s] creating build
> > [   33s] creating build/lib
> > [   33s] creating build/lib/bencode
> > [   33s] copying bencode/__init__.py -> build/lib/bencode
> > [   33s] copying bencode/exceptions.py -> build/lib/bencode
> > [   33s] copying bencode/BTL.py -> build/lib/bencode
> > [   33s] running egg_info
> > [   33s] writing bencode.py.egg-info/PKG-INFO
> > [   33s] writing top-level names to bencode.py.egg-info/top_level.txt
> > [   33s] writing dependency_links to bencode.py.egg-info/dependency_links.txt
> > ===
> > 
> > But the python3 build fails:
> > ===
> > 
> > [   33s] [pbr] Reusing existing SOURCES.txt
> > [   33s] ++ '[' -f _current_flavor ']'
> > [   33s] ++ cat _current_flavor
> > [   33s] + python_flavor=python2
> > [   33s] + '[' -z python2 ']'
> > [   33s] + '[' python2 '!=' python3 ']'
> > [   33s] + '[' -d build ']'
> > [   33s] + mv build _build.python2
> > [   33s] + '[' -d _build.python3 ']'
> > [   33s] + echo python3
> > [   33s] + /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s'
> > [   34s] Download error on https://pypi.python.org/simple/pbr/: [Errno
> > -3] Temporary failure in name resolution -- Some packages may not be
> > found!
> > [   34s] Couldn't find index page for 'pbr' (maybe misspelled?)
> > [   34s] Download error on https://pypi.python.org/simple/: [Errno -3]
> > Temporary failure in name resolution -- Some packages may not be
> > found!
> > [   34s] No local packages or working download links found for pbr>=1.9
> > [   34s] Traceback (most recent call last):
> > [   34s]   File "setup.py", line 13, in <module>
> > [   34s]     pbr=True,
> > [   34s]   File "/usr/lib64/python3.6/distutils/core.py", line 108, in setup
> > [   34s]     _setup_distribution = dist = klass(attrs)
> > [   34s]   File "/usr/lib/python3.6/site-packages/setuptools/dist.py",
> > line 317, in __init__
> > [   34s]     self.fetch_build_eggs(attrs['setup_requires'])
> > [   34s]   File "/usr/lib/python3.6/site-packages/setuptools/dist.py",
> > line 372, in fetch_build_eggs
> > [   34s]     replace_conflicting=True,
> > [   34s]   File
> > "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line
> > 851, in resolve
> > [   34s]     dist = best[req.key] = env.best_match(req, ws, installer)
> > [   34s]   File
> > "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line
> > 1123, in best_match
> > [   34s]     return self.obtain(req, installer)
> > [   34s]   File
> > "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line
> > 1135, in obtain
> > [   34s]     return installer(requirement)
> > [   34s]   File "/usr/lib/python3.6/site-packages/setuptools/dist.py",
> > line 440, in fetch_build_egg
> > [   34s]     return cmd.easy_install(req)
> > [   34s]   File
> > "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py",
> > line 668, in easy_install
> > [   34s]     raise DistutilsError(msg)
> > [   34s] distutils.errors.DistutilsError: Could not find suitable
> > distribution for Requirement.parse('pbr>=1.9')
> > ===
> > 
> > Thanks
> > --
> > Greg Freemyer
> > --
> > To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org
> > To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
> > 
> 
> It looks like pbr is a build requirement for both python2 and python3,
> but you only BuildRequires the python2 version. Since the python3
> version of pbr cannot be found, setuptools is trying to download it,
> but can't because the OBS sandbox prevents downloading files. This
> leads to your error.
> 
> To fix this, the line:
> 
> BuildRequires:  python-pbr
> 
> should be
> 
> BuildRequires:  %{python_module pbr}
> 
> Overall, "BuildRequires:  python-foo" should only be used when the
> python2 version of the package Buildrequires "python-foo" but the
> python3 version does not BuildRequires "python3-foo" (and vice versus,
> but that is rarer except for python3-Sphinx).
> 
> Note that you don't need to do this for Requires, "python-foo" will be
> automatically converted to the appropriate package for Requires.
> 
> -Todd

On another note, it doesn't look like this package follows python
package naming guidelines. This is based on the "bencode.py" project
[1], rather than the "bencode" project [2]. So it should be
"python-bencode.py", which should Provides/Obsoletes python-bencode.
For Provides/Obsoletes, it should be Provides/Obsoletes
"python-bencode" as well as "%{oldpython}-bencode".  See the the wiki
page for more details [3].

[1] https://pypi.python.org/pypi/bencode.py/
[2] https://pypi.python.org/pypi/bencode/
[3] https://en.opensuse.org/openSUSE:Packaging_Python_Singlespec#Obsoleting_and_Providing_old_symbols
                
-- 
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org
To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic