From b423225f2557690436dc4e705c0c56c23694a2001eb2c58d99487836671ace14 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 15 May 2017 13:04:00 +0000 Subject: [PATCH] Accepting request 493188 from home:DocB:branches:devel:languages:python changes for singlespec OBS-URL: https://build.opensuse.org/request/show/493188 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-simpleeval?expand=0&rev=6 --- python-simpleeval.changes | 5 +++++ python-simpleeval.spec | 19 ++++++++----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/python-simpleeval.changes b/python-simpleeval.changes index 0e22137..bbc0a16 100644 --- a/python-simpleeval.changes +++ b/python-simpleeval.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 3 20:20:08 UTC 2017 - axel.braun@gmx.de + +- changes for singlespec + ------------------------------------------------------------------- Tue Apr 21 11:36:32 UTC 2015 - axel.braun@gmx.de diff --git a/python-simpleeval.spec b/python-simpleeval.spec index f0d5c15..2acf899 100644 --- a/python-simpleeval.spec +++ b/python-simpleeval.spec @@ -16,6 +16,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} %define modname simpleeval Name: python-%{modname} @@ -26,15 +27,11 @@ Summary: A simple, safe single expression evaluator library License: MIT Group: Development/Languages/Python Source: https://pypi.python.org/packages/source/s/%{modname}/%{modname}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-setuptools - -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%else +BuildRoot: %{_tmppath}/%{modname}-%{version}-build +BuildRequires: python-rpm-macros +BuildRequires: %{python_module setuptools} BuildArch: noarch -%py_requires -%endif +%python_subpackages %description A quick single file library for easily adding evaluatable expressions @@ -50,14 +47,14 @@ to give full eval() access, or don’t want to run in javascript on the client s rm -f %{modname}.egg-info/*.orig %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install rm -rf %{buildroot}%{python_sitelib}/%{mod2nam}/tests # Don't install tests rm -rf %{buildroot}%{python_sitelib}/%{mod2nam}/*.exe # Remove unneeded files -%files +%files %{python_files} %defattr(-,root,root,-) %doc README.rst %{python_sitelib}/*