-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add sampleproject reference for pure pyproject.toml package
- Loading branch information
1 parent
1aa9ac9
commit ec88b82
Showing
4 changed files
with
198 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# | ||
# spec file for package python-sampleproject | ||
# | ||
# Copyright (c) __YEAR__ SUSE LLC | ||
# | ||
# 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 https://bugs.opensuse.org/ | ||
# | ||
|
||
|
||
Name: python-sampleproject | ||
Version: 3.0.0 | ||
Release: 0 | ||
Summary: A sample Python project | ||
License: Copyright (c) 2016 The Python Packaging Authority (PyPA) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
(FIXME:No SPDX) | ||
URL: https://github.com/pypa/sampleproject | ||
Source: https://files.pythonhosted.org/packages/source/s/sampleproject/sampleproject-%{version}.tar.gz | ||
BuildRequires: python-rpm-macros | ||
BuildRequires: %{python_module pip} | ||
BuildRequires: %{python_module setuptools >= 43.0.0} | ||
BuildRequires: %{python_module wheel} | ||
# SECTION test requirements | ||
BuildRequires: %{python_module peppercorn} | ||
BuildRequires: %{python_module coverage} | ||
# /SECTION | ||
BuildRequires: fdupes | ||
Requires: python-peppercorn | ||
Suggests: python-check-manifest | ||
BuildArch: noarch | ||
%python_subpackages | ||
|
||
%description | ||
A sample Python project | ||
|
||
%prep | ||
%autosetup -p1 -n sampleproject-%{version} | ||
|
||
%build | ||
%pyproject_wheel | ||
|
||
%install | ||
%pyproject_install | ||
%python_clone -a %{buildroot}%{_bindir}/sample | ||
%python_expand %fdupes %{buildroot}%{$python_sitelib} | ||
|
||
%post | ||
%python_install_alternative sample | ||
|
||
%postun | ||
%python_uninstall_alternative sample | ||
|
||
%files %{python_files} | ||
%doc README.md | ||
%license LICENSE.txt | ||
%python_alternative %{_bindir}/sample | ||
%{python_sitelib}/sampleproject | ||
%{python_sitelib}/sampleproject-%{version}.dist-info | ||
|
||
%changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# | ||
# spec file for package python-sampleproject | ||
# | ||
# Copyright (c) __YEAR__ SUSE LLC | ||
# | ||
# 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 https://bugs.opensuse.org/ | ||
# | ||
|
||
|
||
Name: python-sampleproject | ||
Version: 3.0.0 | ||
Release: 0 | ||
Summary: A sample Python project | ||
License: Copyright (c) 2016 The Python Packaging Authority (PyPA) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. (FIXME:No SPDX) | ||
URL: | ||
Source: https://files.pythonhosted.org/packages/source/s/sampleproject/sampleproject-%{version}.tar.gz | ||
BuildRequires: python-rpm-macros | ||
BuildRequires: %{python_module pip} | ||
BuildRequires: fdupes | ||
BuildArch: noarch | ||
%python_subpackages | ||
|
||
%description | ||
# A sample Python project | ||
|
||
![Python Logo](https://www.python.org/static/community_logos/python-logo.png "Sample inline image") | ||
|
||
A sample project that exists as an aid to the [Python Packaging User | ||
Guide][packaging guide]'s [Tutorial on Packaging and Distributing | ||
Projects][distribution tutorial]. | ||
|
||
This project does not aim to cover best practices for Python project | ||
development as a whole. For example, it does not provide guidance or tool | ||
recommendations for version control, documentation, or testing. | ||
|
||
[The source for this project is available here][src]. | ||
|
||
The metadata for a Python project is defined in the `pyproject.toml` file, | ||
an example of which is included in this project. You should edit this file | ||
accordingly to adapt this sample project to your needs. | ||
|
||
---- | ||
|
||
This is the README file for the project. | ||
|
||
The file should use UTF-8 encoding and can be written using | ||
[reStructuredText][rst] or [markdown][md use] with the appropriate [key set][md | ||
use]. It will be used to generate the project webpage on PyPI and will be | ||
displayed as the project homepage on common code-hosting services, and should be | ||
written for that purpose. | ||
|
||
Typical contents for this file would include an overview of the project, basic | ||
usage examples, etc. Generally, including the project changelog in here is not a | ||
good idea, although a simple “What's New” section for the most recent version | ||
may be appropriate. | ||
|
||
[packaging guide]: https://packaging.python.org | ||
[distribution tutorial]: https://packaging.python.org/tutorials/packaging-projects/ | ||
[src]: https://github.com/pypa/sampleproject | ||
[rst]: http://docutils.sourceforge.net/rst.html | ||
[md]: https://tools.ietf.org/html/rfc7764#section-3.5 "CommonMark variant" | ||
[md use]: https://packaging.python.org/specifications/core-metadata/#description-content-type-optional | ||
|
||
|
||
%prep | ||
%autosetup -p1 -n sampleproject-%{version} | ||
|
||
%build | ||
%pyproject_wheel | ||
|
||
%install | ||
%pyproject_install | ||
%python_expand %fdupes %{buildroot}%{$python_sitelib} | ||
|
||
%files %{python_files} | ||
%{python_sitelib}/sampleproject | ||
%{python_sitelib}/sampleproject-%{version}.dist-info | ||
|
||
%changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters