[packages/pyp2rpm] pld template upstreamed (yay!)

glen glen at pld-linux.org
Fri Mar 11 23:06:27 CET 2016


commit 41978a25c4cf4930a174bf77b6241b6ad12b8d00
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Mar 12 00:03:39 2016 +0200

    pld template upstreamed (yay!)
    
    https://bitbucket.org/bkabrda/pyp2rpm/pull-requests/12/add-pld-template
    https://github.com/fedora-python/pyp2rpm/commit/e920a94265b3ce17941a06319a92546a5b7b236e

 pld.spec.tmpl | 126 ----------------------------------------------------------
 pyp2rpm.spec  |   5 +--
 2 files changed, 1 insertion(+), 130 deletions(-)
---
diff --git a/pyp2rpm.spec b/pyp2rpm.spec
index 0598f60..656c970 100644
--- a/pyp2rpm.spec
+++ b/pyp2rpm.spec
@@ -5,12 +5,11 @@
 Summary:	Convert Python packages to RPM .spec files
 Name:		pyp2rpm
 Version:	2.0.0
-Release:	0.2
+Release:	1
 License:	MIT
 Group:		Development
 Source0:	https://github.com/fedora-python/pyp2rpm/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	5b4f8287aa8c09a5005499970ab40f6d
-Source2:	pld.spec.tmpl
 Patch0:		default-savepath.patch
 Patch1:		no-rpmdev-packager.patch
 Patch2:		default-distro.patch
@@ -40,8 +39,6 @@ information though).
 %patch1 -p1
 %patch2 -p1
 
-#cp -p %{SOURCE2} pyp2rpm/templates/pld.spec
-
 %build
 %py_build
 
diff --git a/pld.spec.tmpl b/pld.spec.tmpl
deleted file mode 100644
index 7b961aa..0000000
--- a/pld.spec.tmpl
+++ /dev/null
@@ -1,126 +0,0 @@
-{{ data.credit_line }}
-{% from 'macros.spec' import dependencies, for_python_versions, underscored_or_pypi -%}
-{%- for pv in data.python_versions %}
-%define		with_python{{ pv }} 1
-{%- endfor %}
-%define		pypi_name	{{ data.name }}
-Summary:	{{ data.summary }}
-Name:		{{ data.pkg_name|macroed_pkg_name|name_for_python_version(data.base_python_version) }}
-Version:	{{ data.version }}
-Release:	0.1
-License:	{{ data.license }}
-Group:		Libraries/Python
-Source0:	{{ data.url|replace(data.version, '%{version}') }}
-# Source0-md5:	-
-URL:		{{ data.release_url|replace(data.version, '%{version}') }}
-{{ dependencies(data.build_deps, False, data.base_python_version, data.base_python_version) }}
-{%- for pv in data.python_versions %}
-{{ dependencies(data.build_deps, False, pv, data.base_python_version) }}
-{%- endfor %}
-{{ dependencies(data.runtime_deps, True, data.base_python_version, data.base_python_version) }}
-{%- if not data.has_extension %}
-BuildArch:	noarch
-{%- endif %}
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-{{ data.description|truncate(400)|wordwrap }}
-{% call(pv) for_python_versions(data.python_versions) -%}
-%package -n {{ data.name|macroed_pkg_name|name_for_python_version(pv) }}
-Summary:	{{ data.summary }}
-{{ dependencies(data.runtime_deps, True, pv, pv) }}
-
-%description -n {{ data.name|macroed_pkg_name|name_for_python_version(pv) }}
-{{ data.description|truncate(400)|wordwrap }}
-{%- endcall %}
-
-%prep
-%setup -q -n %{pypi_name}-%{version}
-{%- if data.has_bundled_egg_info %}
-
-# Remove bundled egg-info
-%{__rm} -r %{pypi_name}.egg-info
-{%- endif %}
-{% call(pv) for_python_versions([data.base_python_version] + data.python_versions, data.base_python_version) -%}
-{%- if pv != data.base_python_version -%}
-rm -rf %{py{{pv}}dir}
-cp -a . %{py{{pv}}dir}
-find %{py{{pv}}dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python{{pv}}}|'
-{%- endif %}
-{%- if data.sphinx_dir %}
-# generate html docs {# TODO: generate properly for other versions (pushd/popd into their dirs...) #}
-{% if pv != data.base_python_version %}python{{ pv }}-{% endif %}sphinx-build {{ data.sphinx_dir }} html
-# remove the sphinx-build leftovers
-%{__rm} -r html/.{doctrees,buildinfo}
-{%- endif %}
-{% endcall %}
-
-%build
-{%- call(pv) for_python_versions([data.base_python_version] + data.python_versions, data.base_python_version) -%}
-{%- if pv != data.base_python_version -%}
-cd %{py{{ pv }}dir}
-{%- endif %}
-{% if data.has_extension %}
-CC="%{__cc}" \
-CFLAGS="%{rpmcflags}" \
-{% endif %}{{ '%{__python}'|python_bin_for_python_version(pv) }} setup.py build
-{% if pv != data.base_python_version -%}
-cd -
-{%- endif %}
-{%- endcall %}
-
-%install
-rm -rf $RPM_BUILD_ROOT
-{%- if data.python_versions|length > 0 %}
-# Must do the subpackages' install first because the scripts in /usr/bin are
-# overwritten with every setup.py install (and we want the python2 version
-# to be the default for now).
-{%- endif -%}
-{%- call(pv) for_python_versions(data.python_versions + [data.base_python_version], data.base_python_version) -%}
-{%- if pv != data.base_python_version -%}
-cd %{py{{ pv }}dir}
-{%- endif %}
-{{ '%{__python}'|python_bin_for_python_version(pv) }} setup.py install \
-	--skip-build \
-	--optimize=2 \
-	--root=$RPM_BUILD_ROOT
-
-%py_postclean
-{%- if pv != data.base_python_version %}
-{%- if data.scripts %}
-{%- for script in data.scripts %}
-mv $RPM_BUILD_ROOT%{_bindir}/{{ script }} $RPM_BUILD_ROOT%{_bindir}/{{ script|script_name_for_python_version(pv) }}
-{%- endfor %}
-{%- endif %}
-cd -
-{%- endif %}
-{%- endcall %}
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-{% call(pv) for_python_versions([data.base_python_version] + data.python_versions, data.base_python_version) -%}
-%files{% if pv != data.base_python_version %} -n {{ data.pkg_name|macroed_pkg_name|name_for_python_version(pv) }}{% endif %}
-%defattr(644,root,root,755)
-%doc {% if data.sphinx_dir %}html {% endif %}{{ data.doc_files|join(' ') }}
-{%- if data.scripts %}
-{%- for script in data.scripts %}
-%attr(755,root,root) %{_bindir}/{{ script|script_name_for_python_version(pv) }}
-{%- endfor %}
-{%- endif %}
-{%- if data.has_packages %}
-{{ '%{python_sitelib}'|sitedir_for_python_version(pv) }}/{{ underscored_or_pypi(data.name, data.underscored_name) }}
-{%- endif %}
-{%- if data.py_modules %}
-{% for module in data.py_modules -%}
-{%- if pv == '3' -%}
-{{ '%{python_sitelib}'|sitedir_for_python_version(pv) }}/__pycache__/*
-{% endif -%}
-{{ '%{python_sitelib}'|sitedir_for_python_version(pv) }}/{% if data.name == module %}%{pypi_name}{% else %}{{ module }}{% endif %}.py{% if pv != '3'%}[co]{% endif %}
-{%- endfor %}
-{%- endif %}
-{{ '%{python_sitelib}'|sitedir_for_python_version(pv) }}/{{ underscored_or_pypi(data.name, data.underscored_name) }}-%{version}-py*.egg-info
-{%- if data.has_extension %}
-{{ '%{python_sitearch}'|sitedir_for_python_version(pv) }}/{{ underscored_or_pypi(data.name, data.underscored_name) }}
-{%- endif %}
-{%- endcall %}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pyp2rpm.git/commitdiff/41978a25c4cf4930a174bf77b6241b6ad12b8d00



More information about the pld-cvs-commit mailing list