Open shlomif opened 7 years ago
I assume pyp2rpm was run on Mageia system. @glensc could you please take a look at this?
@mcyprian i'm no mageia, but pld linux user :)
however the problem seems to be that generted %changelog
doesn't include date or author, only version which results bad changelog section parsing.
there's no need to generate %changelog at all imho.
@shlomif post your python-enum34.spec, it could help identifying clearly what was generated there.
On Mon, 17 Jul 2017 23:48:55 -0700 Elan Ruusamäe notifications@github.com wrote:
@mcyprian i'm no mageia, but pld linux user :)
however the problem seems to be that generted
%changelog
doesn't include date or author, only version which results bad changelog section parsing.there's no need to generate %changelog at all imho.
@shlomif post your python-enum34.spec, it could help identifying clearly what was generated there.
My python-enum34.spec is this:
# Created by pyp2rpm-3.2.2
%global pypi_name enum34
Name: python-%{pypi_name}
Version: 1.1.6
Release: 1%{?dist}
Summary: Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2
License: BSD License
URL: https://bitbucket.org/stoneleaf/enum34
Source0:
https://files.pythonhosted.org/packages/source/e/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description
enum support for enumerations An enumeration is a set of symbolic names
(members) bound to unique, constant values. Within an enumeration, the members
can be compared by identity, and the enumeration itself can be iterated over.
from enum import Enum class Fruit(Enum): apple 1 banana 2 orange 3 list(Fruit)
[<Fruit.apple: 1>, <Fruit.banana: 2>, <Fruit.orange: 3>] len(Fruit)
Fruit.banana ...
%package -n python2-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name}
enum support for enumerations An enumeration is a set of symbolic names
(members) bound to unique, constant values. Within an enumeration, the members
can be compared by identity, and the enumeration itself can be iterated over.
from enum import Enum class Fruit(Enum): apple 1 banana 2 orange 3 list(Fruit)
[<Fruit.apple: 1>, <Fruit.banana: 2>, <Fruit.orange: 3>] len(Fruit)
Fruit.banana ...
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
enum support for enumerations An enumeration is a set of symbolic names
(members) bound to unique, constant values. Within an enumeration, the members
can be compared by identity, and the enumeration itself can be iterated over.
from enum import Enum class Fruit(Enum): apple 1 banana 2 orange 3 list(Fruit)
[<Fruit.apple: 1>, <Fruit.banana: 2>, <Fruit.orange: 3>] len(Fruit)
Fruit.banana ...
%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py2_build
%py3_build
%install
# Must do the subpackages' install first because the scripts in /usr/bin are
# overwritten with every setup.py install.
%py3_install
%py2_install
%files -n python2-%{pypi_name}
%license enum/LICENSE
%doc
%{python2_sitelib}/enum
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%files -n python3-%{pypi_name}
%license enum/LICENSE
%doc
%{python3_sitelib}/enum
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%changelog
* - 1.1.6-1
- Initial package.
and yes - I am running it on mageia v7 as the subject of the issue mentions.
Regards,
@shlomif
remove broken %changelog
block:
%changelog
* - 1.1.6-1
- Initial package.
ps: markdown does not work when replying via email in github.
@glensc : do you want me to remove it manually, or should pyp2rpm avoid generating it in the first place?
@shlomif won't megeia template (-t mageia.spec) work for you? This template doesn't contain changelog but I am not sure if it is up-to-date. Maybe we could switch default template to mageia/pld when -o is specified, what do you think @glensc?
On Wed, 19 Jul 2017 08:32:36 +0000 (UTC) Michal Cyprian notifications@github.com wrote:
@shlomif won't megeia template (-t mageia.spec) work for you?
I'll try - thanks.
This template doesn't contain changelog but I am not sure if it is up-to-date. Maybe we could switch default template to mageia/pld when -o is specified, what do you think @glensc?
Hi all!
@mcyprian : thanks and sorry for the late reply! pyp2rpm -d /home/shlomif/progs/Rpms/ --srpm -t mageia.spec enum34
indeed produced an src.rpm but now rpmbuild --rebuild ing it fails:
Installing /home/shlomif/progs/Rpms/python-enum34-1.1.6-1.mga7.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.7ZzLVV
+ umask 022
+ cd /home/shlomif/progs/Rpms/BUILD
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ cd /home/shlomif/progs/Rpms/BUILD
+ rm -rf enum34-1.1.6
+ /usr/bin/gzip -dc /home/shlomif/progs/Rpms/SOURCES/enum34-1.1.6.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd enum34-1.1.6
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ rm -rf enum34.egg-info
+ rm -rf /home/shlomif/progs/Rpms/BUILD/python3-python-enum34-1.1.6-1.mga7
+ cp -a . /home/shlomif/progs/Rpms/BUILD/python3-python-enum34-1.1.6-1.mga7
+ find /home/shlomif/progs/Rpms/BUILD/python3-python-enum34-1.1.6-1.mga7 -name '*.py'
+ xargs sed -i '1s|^#!python|#!/usr/bin/python3|'
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.A1eqHn
+ umask 022
+ cd /home/shlomif/progs/Rpms/BUILD
+ cd enum34-1.1.6
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ /usr/bin/python setup.py build
running build
running build_py
creating build
creating build/lib
creating build/lib/enum
copying enum/__init__.py -> build/lib/enum
copying enum/test.py -> build/lib/enum
copying enum/LICENSE -> build/lib/enum
copying enum/README -> build/lib/enum
creating build/lib/enum/doc
copying enum/doc/enum.rst -> build/lib/enum/doc
copying enum/doc/enum.pdf -> build/lib/enum/doc
+ pushd /home/shlomif/progs/Rpms/BUILD/python3-python-enum34-1.1.6-1.mga7
~/progs/Rpms/BUILD/python3-python-enum34-1.1.6-1.mga7 ~/progs/Rpms/BUILD/enum34-1.1.6
+ /usr/bin/python3 setup.py build
running build
running build_py
creating build
creating build/lib
creating build/lib/enum
copying enum/__init__.py -> build/lib/enum
copying enum/test.py -> build/lib/enum
copying enum/LICENSE -> build/lib/enum
copying enum/README -> build/lib/enum
creating build/lib/enum/doc
copying enum/doc/enum.rst -> build/lib/enum/doc
copying enum/doc/enum.pdf -> build/lib/enum/doc
+ popd
~/progs/Rpms/BUILD/enum34-1.1.6
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.YJa66Q
+ umask 022
+ cd /home/shlomif/progs/Rpms/BUILD
+ '[' 1 -eq 1 ']'
+ '[' /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64 '!=' / ']'
+ rm -rf /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64
++ dirname /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64
+ mkdir -p /home/shlomif/progs/Rpms/BUILDROOT
+ mkdir /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64
+ cd enum34-1.1.6
+ '[' 1 -eq 1 ']'
+ pushd /home/shlomif/progs/Rpms/BUILD/python3-python-enum34-1.1.6-1.mga7
~/progs/Rpms/BUILD/python3-python-enum34-1.1.6-1.mga7 ~/progs/Rpms/BUILD/enum34-1.1.6
+ /usr/bin/python3 setup.py install --skip-build --root /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64
running install
running install_lib
creating /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr
creating /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib
creating /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python3.5
creating /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python3.5/site-packages
creating /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python3.5/site-packages/enum
copying build/lib/enum/LICENSE -> /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python3.5/site-packages/enum
creating /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python3.5/site-packages/enum/doc
copying build/lib/enum/doc/enum.rst -> /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python3.5/site-packages/enum/doc
copying build/lib/enum/doc/enum.pdf -> /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python3.5/site-packages/enum/doc
copying build/lib/enum/README -> /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python3.5/site-packages/enum
copying build/lib/enum/__init__.py -> /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python3.5/site-packages/enum
copying build/lib/enum/test.py -> /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python3.5/site-packages/enum
byte-compiling /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python3.5/site-packages/enum/__init__.py to __init__.cpython-35.pyc
byte-compiling /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python3.5/site-packages/enum/test.py to test.cpython-35.pyc
running install_egg_info
running egg_info
creating enum34.egg-info
writing enum34.egg-info/PKG-INFO
writing top-level names to enum34.egg-info/top_level.txt
writing dependency_links to enum34.egg-info/dependency_links.txt
writing manifest file 'enum34.egg-info/SOURCES.txt'
reading manifest file 'enum34.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'enum34.egg-info/SOURCES.txt'
Copying enum34.egg-info to /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python3.5/site-packages/enum34-1.1.6-py3.5.egg-info
running install_scripts
+ popd
~/progs/Rpms/BUILD/enum34-1.1.6
+ /usr/bin/python setup.py install --skip-build --root /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64
running install
running install_lib
creating /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7
creating /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7/site-packages
creating /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7/site-packages/enum
copying build/lib/enum/LICENSE -> /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7/site-packages/enum
creating /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7/site-packages/enum/doc
copying build/lib/enum/doc/enum.rst -> /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7/site-packages/enum/doc
copying build/lib/enum/doc/enum.pdf -> /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7/site-packages/enum/doc
copying build/lib/enum/README -> /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7/site-packages/enum
copying build/lib/enum/__init__.py -> /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7/site-packages/enum
copying build/lib/enum/test.py -> /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7/site-packages/enum
byte-compiling /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7/site-packages/enum/__init__.py to __init__.pyc
byte-compiling /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7/site-packages/enum/test.py to test.pyc
running install_egg_info
running egg_info
creating enum34.egg-info
writing enum34.egg-info/PKG-INFO
writing top-level names to enum34.egg-info/top_level.txt
writing dependency_links to enum34.egg-info/dependency_links.txt
writing manifest file 'enum34.egg-info/SOURCES.txt'
reading manifest file 'enum34.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'enum34.egg-info/SOURCES.txt'
Copying enum34.egg-info to /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7/site-packages/enum34-1.1.6-py2.7.egg-info
running install_scripts
+ /usr/lib/rpm/find-debuginfo.sh --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 -m /home/shlomif/progs/Rpms/BUILD/enum34-1.1.6
+ '[' -n '' ']'
+ /usr/share/spec-helper/clean_files
+ '[' -n '' ']'
+ /usr/share/spec-helper/compress_files .xz
+ '[' -n '' ']'
+ /usr/share/spec-helper/relink_symlinks
+ '[' -n '' ']'
+ /usr/share/spec-helper/clean_perl
+ '[' -n '' ']'
+ /usr/share/spec-helper/lib_symlinks
+ '[' -n '' ']'
+ /usr/share/spec-helper/gprintify
+ '[' -n '' ']'
+ /usr/share/spec-helper/fix_mo
+ '[' -n '' ']'
+ /usr/share/spec-helper/translate_menu
+ '[' -n '' ']'
+ /usr/share/spec-helper/fix_pamd
+ '[' -n '' ']'
+ /usr/share/spec-helper/remove_info_dir
+ '[' -n '' ']'
+ /usr/share/spec-helper/fix_eol
+ '[' -n '' ']'
+ /usr/share/spec-helper/check_elf_files
+ /usr/lib/rpm/mageia/brp-java-repack-jars
+ '[' 1 -eq 1 ']'
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
Bytecompiling .py files below /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python3.5 using /usr/bin/python3.5
Bytecompiling .py files below /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7 using /usr/bin/python2.7
+ /usr/lib/rpm/brp-python-hardlink
Processing files: python-enum34-1.1.6-1.mga7.noarch
error: File not found: /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7/site-packages/enum34
RPM build errors:
File not found: /home/shlomif/progs/Rpms/BUILDROOT/python-enum34-1.1.6-1.mga7.x86_64/usr/lib/python2.7/site-packages/enum34
@mcyprian dunno, mageia and pld-linux have nothing in common.
@glensc I mean pld template for pld, mageia template for mageia of course.
I am getting this with latest pyp2rpm git master: