forked from pool/python-simpleeval
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
This commit is contained in:
@@ -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}/*
|
||||
|
Reference in New Issue
Block a user