Ship python2-sqlalchemy
- Move docs into sub-package - Modernize spec
This commit is contained in:
parent
141f6a8fb4
commit
54e2d23ca1
@ -1,26 +1,18 @@
|
|||||||
%if 0%{?rhel} && 0%{?rhel} <= 6
|
%if 0%{?fedora}
|
||||||
%{!?__python2: %global __python2 %{__python}}
|
|
||||||
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
||||||
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?fedora} > 12
|
|
||||||
%global with_python3 1
|
%global with_python3 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%global srcname SQLAlchemy
|
%global srcname SQLAlchemy
|
||||||
|
|
||||||
Name: python-sqlalchemy
|
Name: python-sqlalchemy
|
||||||
Version: 1.1.3
|
Version: 1.1.3
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Modular and flexible ORM library for python
|
Summary: Modular and flexible ORM library for python
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://www.sqlalchemy.org/
|
URL: http://www.sqlalchemy.org/
|
||||||
Source0: https://files.pythonhosted.org/packages/source/S/%{srcname}/%{srcname}-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/S/%{srcname}/%{srcname}-%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
|
|
||||||
BuildRequires: python2-devel >= 2.6
|
BuildRequires: python2-devel >= 2.6
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
@ -44,10 +36,34 @@ domain.
|
|||||||
|
|
||||||
This package includes the python 2 version of the module.
|
This package includes the python 2 version of the module.
|
||||||
|
|
||||||
|
%package doc
|
||||||
|
Summary: Documentation for SQLAlchemy
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description doc
|
||||||
|
Documentation for SQLAlchemy
|
||||||
|
|
||||||
|
%package -n python2-sqlalchemy
|
||||||
|
Summary: Modular and flexible ORM library for python
|
||||||
|
Group: Development/Libraries
|
||||||
|
%{?python_provide:%python_provide python2-sqlalchemy}
|
||||||
|
|
||||||
|
%description -n python2-sqlalchemy
|
||||||
|
SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible,
|
||||||
|
high-level interface to SQL databases. Database and domain concepts are
|
||||||
|
decoupled, allowing both sides maximum flexibility and power. SQLAlchemy
|
||||||
|
provides a powerful mapping layer that can work as automatically or as manually
|
||||||
|
as you choose, determining relationships based on foreign keys or letting you
|
||||||
|
define the join conditions explicitly, to bridge the gap between database and
|
||||||
|
domain.
|
||||||
|
|
||||||
|
This package includes the python 2 version of the module.
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%package -n python3-sqlalchemy
|
%package -n python3-sqlalchemy
|
||||||
Summary: Modular and flexible ORM library for python
|
Summary: Modular and flexible ORM library for python
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
|
%{?python_provide:%python_provide python%{python3_pkgversion}-sqlalchemy}
|
||||||
|
|
||||||
%description -n python3-sqlalchemy
|
%description -n python3-sqlalchemy
|
||||||
SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible,
|
SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible,
|
||||||
@ -67,64 +83,56 @@ This package includes the python 3 version of the module.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{srcname}-%{version}
|
%setup -q -n %{srcname}-%{version}
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
rm -rf %{py3dir}
|
|
||||||
cp -a . %{py3dir}
|
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="%{optflags}" %{__python2} setup.py build
|
%py2_build
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
%py3_build
|
||||||
CFLAGS="%{optflags}" %{__python3} setup.py build
|
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
#mkdir -p %{buildroot}%{python2_sitelib}
|
||||||
|
%py2_install
|
||||||
mkdir -p %{buildroot}%{python2_sitelib}
|
|
||||||
%{__python2} setup.py install --skip-build --root %{buildroot}
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
#mkdir -p %{buildroot}%{python3_sitelib}
|
||||||
mkdir -p %{buildroot}%{python3_sitelib}
|
%py3_install
|
||||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# remove unnecessary scripts for building documentation
|
# remove unnecessary scripts for building documentation
|
||||||
rm -rf doc/build
|
rm -rf doc/build
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
pytest2="py.test-$(%{__python2} -c 'from __future__ import print_function; import sys; vi=sys.version_info; print("{0}.{1}".format(vi.major, vi.minor))')"
|
pytest2="py.test-$(%{__python2} -c 'from __future__ import print_function; import sys; vi=sys.version_info; print("{0}.{1}".format(vi.major, vi.minor))')"
|
||||||
PYTHONPATH=. "$pytest2" test
|
PYTHONPATH=. "$pytest2" test
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
|
||||||
pytest3="py.test-$(%{__python3} -c 'from __future__ import print_function; import sys; vi=sys.version_info; print("{0}.{1}".format(vi.major, vi.minor))')"
|
pytest3="py.test-$(%{__python3} -c 'from __future__ import print_function; import sys; vi=sys.version_info; print("{0}.{1}".format(vi.major, vi.minor))')"
|
||||||
PYTHONPATH=. "$pytest3" test
|
PYTHONPATH=. "$pytest3" test
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files doc
|
||||||
%defattr(-,root,root,-)
|
%doc doc examples
|
||||||
%doc README.rst LICENSE PKG-INFO CHANGES doc examples
|
|
||||||
|
%files -n python2-sqlalchemy
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.rst
|
||||||
%{python2_sitearch}/*
|
%{python2_sitearch}/*
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%files -n python3-sqlalchemy
|
%files -n python3-sqlalchemy
|
||||||
%defattr(-,root,root,-)
|
%license LICENSE
|
||||||
%doc LICENSE PKG-INFO doc examples
|
%doc README.rst
|
||||||
%{python3_sitearch}/*
|
%{python3_sitearch}/*
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 8 2016 Orion Poplwski <orion@cora.nwra.com> - 1.1.3-2
|
||||||
|
- Ship python2-sqlalchemy
|
||||||
|
- Move docs into sub-package
|
||||||
|
- Modernize spec
|
||||||
|
|
||||||
* Mon Oct 31 2016 Kevin Fenzi <kevin@scrye.com> - 1.1.3-1
|
* Mon Oct 31 2016 Kevin Fenzi <kevin@scrye.com> - 1.1.3-1
|
||||||
- Update to 1.1.3. Fixes bug #1389638
|
- Update to 1.1.3. Fixes bug #1389638
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user