Accepting request 541579 from home:TheBlackCat:branches:devel:languages:python
- Add namespace package that other jaraco packages can use. - Add namespace package that other jaraco packages can use. - Properly handle namespace package structure. This guarantees the module is importable. OBS-URL: https://build.opensuse.org/request/show/541579 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jaraco.packaging?expand=0&rev=2
This commit is contained in:
parent
deb690e5da
commit
7d44f61cc0
5
python-jaraco.base.changes
Normal file
5
python-jaraco.base.changes
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 13 17:25:52 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Add namespace package that other jaraco packages can use.
|
||||||
|
|
62
python-jaraco.base.spec
Normal file
62
python-jaraco.base.spec
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-jaraco.base
|
||||||
|
#
|
||||||
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
Name: python-jaraco.base
|
||||||
|
Version: 4.1
|
||||||
|
Release: 0
|
||||||
|
Summary: Base namespace for jaraco packages
|
||||||
|
License: MIT
|
||||||
|
Group: Development/Languages/Python
|
||||||
|
Url: https://github.com/jaraco/jaraco.packaging
|
||||||
|
Source: https://files.pythonhosted.org/packages/source/j/jaraco.packaging/jaraco.packaging-%{version}.tar.gz
|
||||||
|
BuildRequires: %{python_module base}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
BuildArch: noarch
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package provides a base namespace to guarantee
|
||||||
|
that other jaraco packages can be imported.
|
||||||
|
|
||||||
|
This should not be installed directly, all packages
|
||||||
|
using the "jaraco" namespace should depend on it.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n jaraco.packaging-%{version}
|
||||||
|
rm -rf jaraco.packaging.egg-info
|
||||||
|
|
||||||
|
%build
|
||||||
|
# Not needed
|
||||||
|
|
||||||
|
%install
|
||||||
|
%{python_expand install -D -m 644 jaraco/__init__.py %{buildroot}%{$python_sitelib}/jaraco/__init__.py
|
||||||
|
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/jaraco/
|
||||||
|
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/jaraco/
|
||||||
|
%fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
}
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%dir %{python_sitelib}/jaraco/
|
||||||
|
%{python_sitelib}/jaraco/__init__.py*
|
||||||
|
%pycache_only %dir %{python_sitelib}/jaraco/__pycache__/
|
||||||
|
%pycache_only %{python_sitelib}/jaraco/__pycache__/__init__*.py*
|
||||||
|
|
||||||
|
%changelog
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 13 17:25:52 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Add namespace package that other jaraco packages can use.
|
||||||
|
- Properly handle namespace package structure.
|
||||||
|
This guarantees the module is importable.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jul 5 08:00:46 UTC 2017 - aloisio@gmx.com
|
Wed Jul 5 08:00:46 UTC 2017 - aloisio@gmx.com
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
%bcond_with test
|
||||||
Name: python-jaraco.packaging
|
Name: python-jaraco.packaging
|
||||||
Version: 4.1
|
Version: 4.1
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -26,13 +27,17 @@ Group: Development/Languages/Python
|
|||||||
Url: https://github.com/jaraco/jaraco.packaging
|
Url: https://github.com/jaraco/jaraco.packaging
|
||||||
Source: https://files.pythonhosted.org/packages/source/j/jaraco.packaging/jaraco.packaging-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/j/jaraco.packaging/jaraco.packaging-%{version}.tar.gz
|
||||||
BuildRequires: %{python_module base}
|
BuildRequires: %{python_module base}
|
||||||
|
BuildRequires: %{python_module jaraco.base}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module setuptools_scm}
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
%if %{with test}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
%endif
|
||||||
|
Requires: python-jaraco.base
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun): update-alternatives
|
Requires(preun): update-alternatives
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@ -48,7 +53,12 @@ rm -rf jaraco.packaging.egg-info
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
# We will package the namespace __init__.py separately
|
||||||
|
%{python_expand rm %{buildroot}%{$python_sitelib}/jaraco/__init__.py*
|
||||||
|
rm -rf %{buildroot}%{$python_sitelib}/jaraco/__pycache__/
|
||||||
|
%fdupes -s %{buildroot}%{$python_sitelib}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
%python_clone -a %{buildroot}%{_bindir}/dependency-tree
|
%python_clone -a %{buildroot}%{_bindir}/dependency-tree
|
||||||
%python_clone -a %{buildroot}%{_bindir}/upload-package
|
%python_clone -a %{buildroot}%{_bindir}/upload-package
|
||||||
@ -59,11 +69,17 @@ rm -rf jaraco.packaging.egg-info
|
|||||||
%postun
|
%postun
|
||||||
%python_uninstall_alternative dependency-tree
|
%python_uninstall_alternative dependency-tree
|
||||||
|
|
||||||
|
%if %{with test}
|
||||||
|
%check
|
||||||
|
%python_expand py.test-%{$python_bin_suffix}
|
||||||
|
%endif
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc CHANGES.rst README.rst
|
%doc CHANGES.rst README.rst
|
||||||
%python_alternative %{_bindir}/dependency-tree
|
%python_alternative %{_bindir}/dependency-tree
|
||||||
%python_alternative %{_bindir}/upload-package
|
%python_alternative %{_bindir}/upload-package
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/jaraco.packaging-%{version}-py*.egg-info
|
||||||
|
%{python_sitelib}/jaraco/packaging/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user