Changes

Jump to navigation Jump to search
2,763 bytes added ,  23:08, 26 March 2018
Line 14: Line 14:  
   ll /usr/lib/python2.6/site-packages/ccnet
 
   ll /usr/lib/python2.6/site-packages/ccnet
 
this  one needs ccnet, which will need a rebuild
 
this  one needs ccnet, which will need a rebuild
 +
 +
== build python rpms  ==
 +
 +
to build python as rpm when they can not be downloaded with pip without compilation, or simply to build them all
 +
scl enable python27 bash
 +
pip install pyp2rpm
 +
pip install  spec2scl
 +
pyp2rpm django-compressor|spec2scl
 +
 +
 +
 +
<syntaxhighlight lang="spec">
 +
%{?scl:%scl_package python-%{pypi_name}}
 +
%{!?scl:%global pkg_name %{name}}
 +
 +
# Created by pyp2rpm-3.3.2
 +
%global pypi_name django-compressor
 +
 +
Name:          %{?scl_prefix}python-%{pypi_name}
 +
Version:        2.2
 +
Release:        1%{?dist}
 +
Summary:        Compresses linked and inline JavaScript or CSS into single cached files
 +
 +
License:        MIT
 +
URL:            https://django-compressor.readthedocs.io/en/latest/
 +
Source0:        https://files.pythonhosted.org/packages/source/d/%{pypi_name}/django_compressor-%{version}.tar.gz
 +
BuildArch:      noarch
 +
 +
%{?scl:Requires: %{scl}-runtime}
 +
%{?scl:BuildRequires: %{scl}-runtime}
 +
BuildRequires:  %{?scl_prefix}python2-devel
 +
BuildRequires:  %{?scl_prefix}python2dist(django-appconf) >= 1.0
 +
BuildRequires:  %{?scl_prefix}python2dist(rcssmin) = 1.0.6
 +
BuildRequires:  %{?scl_prefix}python2dist(rjsmin) = 1.0.12
 +
BuildRequires:  %{?scl_prefix}python2dist(setuptools)
 +
BuildRequires:  %{?scl_prefix}python2dist(sphinx)
 +
 +
 +
%description
 +
Django Compressor :target:
 +
 +
 +
%package -n    %{?scl_prefix}python2-%{pypi_name}
 +
Summary:        %{summary}
 +
%{?python_provide:%python_provide python2-%{pypi_name}}
 +
 +
Requires:      %{?scl_prefix}python2dist(django-appconf) >= 1.0
 +
Requires:      %{?scl_prefix}python2dist(rcssmin) = 1.0.6
 +
Requires:      %{?scl_prefix}python2dist(rjsmin) = 1.0.12
 +
 +
%description -n %{?scl_prefix}python2-%{pypi_name}
 +
Django Compressor :target:
 +
 +
 +
%package -n %{?scl_prefix}python-%{pypi_name}-doc
 +
Summary:        django-compressor documentation
 +
 +
%description -n %{?scl_prefix}python-%{pypi_name}-doc
 +
Documentation for django-compressor
 +
 +
 +
%prep
 +
%{?scl:scl enable %{scl} - << \EOF}
 +
set -ex
 +
%autosetup -n django_compressor-%{version}
 +
# Remove bundled egg-info
 +
rm -rf %{pypi_name}.egg-info
 +
%{?scl:EOF}
 +
 +
 +
%build
 +
%{?scl:scl enable %{scl} - << \EOF}
 +
set -ex
 +
%py2_build
 +
# generate html docs
 +
PYTHONPATH=${PWD} sphinx-build-2 docs html
 +
# remove the sphinx-build leftovers
 +
rm -rf html/.{doctrees,buildinfo}
 +
%{?scl:EOF}
 +
 +
 +
%install
 +
%{?scl:scl enable %{scl} - << \EOF}
 +
set -ex
 +
%py2_install
 +
%{?scl:EOF}
 +
 +
 +
%check
 +
%{?scl:scl enable %{scl} - << \EOF}
 +
set -ex
 +
%{__python2} setup.py test
 +
%{?scl:EOF}
 +
 +
 +
%files -n %{?scl_prefix}python2-%{pypi_name}
 +
%license LICENSE
 +
%doc README.rst
 +
%{python2_sitelib}/compressor
 +
%{python2_sitelib}/django_compressor-%{version}-py?.?.egg-info
 +
 +
 +
%files -n %{?scl_prefix}python-%{pypi_name}-doc
 +
%doc html
 +
%license LICENSE
 +
 +
 +
%changelog
 +
* Mon Mar 26 2018 John Doe <john@doe.com> - 2.2-1
 +
- Initial package.
 +
</syntaxhighlight>
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,250

edits

Navigation menu