Skip to content

Instantly share code, notes, and snippets.

@Sammers21
Created August 24, 2017 09:35
Show Gist options
  • Select an option

  • Save Sammers21/2677525d10ef50529cde75679547ee54 to your computer and use it in GitHub Desktop.

Select an option

Save Sammers21/2677525d10ef50529cde75679547ee54 to your computer and use it in GitHub Desktop.
python-semantic_version
sammers21@ROSA ~/rpmbuild/SPECS $ rpmbuild -bb python-semantic_version.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.39158
+ umask 022
+ cd /home/sammers21/rpmbuild/BUILD
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ %autosetup -n python-semanticversion-2.6.0
/var/tmp/rpm-tmp.39158: line 28: fg: no job control
error: Bad exit status from /var/tmp/rpm-tmp.39158 (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.39158 (%prep)
%global pypi_name semantic_version
Name: python-%{pypi_name}
Version: 2.6.0
Release: %mkrel 2
Summary: Library implementing the 'SemVer' scheme
Group: Development/Python
License: BSD
URL: https://github.com/rbarrois/python-semanticversion
Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
%global _description \
This small python library provides a few tools to handle semantic versioning\
in Python.
%description %{_description}
%package -n python2-%{pypi_name}
Summary: %{summary}
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: python-django
%{?python_provide:%python_provide python2-%{pypi_name}}
Provides: python-semantic-version
%description -n python2-%{pypi_name} %{_description}
Python 2 version.
%package doc
Summary: Documentation for python-%{pypi_name}
BuildRequires: python-sphinx
%description doc
%{summary}.
%prep
%autosetup -n python-semanticversion-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
# documentation builds due to broken symlink
# https://github.com/rbarrois/python-semanticversion/issues/20
rm docs/credits.rst
%build
%py2_build
# generate html docs
sphinx-build docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%py2_install
%check
# Seems like it's just stuck in koji
#{__python2} setup.py test
#{__python3} setup.py test
%files -n python2-%{pypi_name}
%license LICENSE
%doc README.rst ChangeLog
%{python2_sitelib}/%{pypi_name}/
%{python2_sitelib}/%{pypi_name}-*.egg-info/
%files doc
%license LICENSE
%doc html
%changelog
* Sat Aug 05 2017 pterjan <pterjan> 2.6.0-2.mga7
+ Revision: 1135625
- Rebuild for python 3.6
* Fri Feb 10 2017 akien <akien> 2.6.0-1.mga6
+ Revision: 1085555
- import python-semantic_version from Fedora 26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment