summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-05 12:11:23 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-05 12:11:23 +0000
commit7904ca37614c895e8883343bb15db368786fcb2d (patch)
treef705101d858be131b1ca4306ab5f0f0adf7bbe16
parent6d6d86edb1683a24c4d25b94ca7fca12a25fca8a (diff)
automatic import of python-setuptools-declarative-requirementsopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-setuptools-declarative-requirements.spec298
-rw-r--r--sources1
3 files changed, 300 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..eba6c42 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/setuptools-declarative-requirements-1.3.0.tar.gz
diff --git a/python-setuptools-declarative-requirements.spec b/python-setuptools-declarative-requirements.spec
new file mode 100644
index 0000000..f15c38d
--- /dev/null
+++ b/python-setuptools-declarative-requirements.spec
@@ -0,0 +1,298 @@
+%global _empty_manifest_terminate_build 0
+Name: python-setuptools-declarative-requirements
+Version: 1.3.0
+Release: 1
+Summary: File support for setuptools declarative setup.cfg
+License: Apache Software License 2.0
+URL: https://github.com/s0undt3ch/setuptools-declarative-requirements
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f0/06/85fb4a4ccb82f5040cd5ddc4ab55db5f9d16e0a1b43887e82a8e671e17cb/setuptools-declarative-requirements-1.3.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-setuptools
+
+%description
+# Declarative `setuptools` Config Requirements Files Support
+
+This projects adds the ability for projects using setuptools declarative configuration
+to specify requirements using requirements files.
+
+### ⚠ **There's a reason why this isn't, at least yet, supported by default. Please [read why](https://github.com/pypa/setuptools/issues/1951).**
+
+Anyway, if you know what you're doing, then this library solves the missing feature
+of defining requirements using requirements files.
+
+## `setup.cfg`
+Your `setup.cfg` should include a section named `requirements-files`, like:
+
+```ini
+[requirements-files]
+setup_requires = requirements/setup.txt
+install_requires = requirements/base.txt
+tests_require = requirements/tests.txt
+extras_require =
+ docs = requirements/docs.txt
+ cli = requirements/cli.txt
+```
+
+### ⚠ ATTENTION
+
+#### The requirements files **MUST** be included in the wheel file aswell as the source tarball
+
+For the example shown above, in ``setup.cfg``, add something like:
+
+```ini
+[options.data_files]
+. = requirements/*.txt
+```
+
+Or something like the folowing on your ``MANIFEST.in``:
+
+```
+include requirements/*.txt
+```
+
+Or, if you use [setuptools-scm](https://pypi.org/project/setuptools-scm), the requirements files
+need to be committed to the SCM repo.
+
+
+## `pyproject.toml`
+Your `pyproject.toml` should also include `setuptools-declarative-requirements`:
+```toml
+[build-system]
+requires = ["setuptools>=50.3.2", "wheel", "setuptools-declarative-requirements"]
+build-backend = "setuptools.build_meta"
+```
+
+## `setup.py`
+Some projects still use a `setup.py` shim, similar to:
+```python
+#!/usr/bin/env python
+import setuptools
+
+if __name__ == "__main__":
+ setuptools.setup()
+```
+
+If this is your case, your `setup.cfg` needs an extra bit of tweak. Make sure you have
+``setuptools-declarative-requirements`` in your `setup_requires`:
+```ini
+[options]
+setup_requires =
+ setuptools>=50.3.2
+ setuptools-declarative-requirements
+```
+
+## Do Note That
+### ⚠ This project makes no attempt to validate your requirements files.
+**The only thing it does is include every non empty line from your requirements files which does
+not start with `#`, `-r` or `--`.**
+
+
+%package -n python3-setuptools-declarative-requirements
+Summary: File support for setuptools declarative setup.cfg
+Provides: python-setuptools-declarative-requirements
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-setuptools-declarative-requirements
+# Declarative `setuptools` Config Requirements Files Support
+
+This projects adds the ability for projects using setuptools declarative configuration
+to specify requirements using requirements files.
+
+### ⚠ **There's a reason why this isn't, at least yet, supported by default. Please [read why](https://github.com/pypa/setuptools/issues/1951).**
+
+Anyway, if you know what you're doing, then this library solves the missing feature
+of defining requirements using requirements files.
+
+## `setup.cfg`
+Your `setup.cfg` should include a section named `requirements-files`, like:
+
+```ini
+[requirements-files]
+setup_requires = requirements/setup.txt
+install_requires = requirements/base.txt
+tests_require = requirements/tests.txt
+extras_require =
+ docs = requirements/docs.txt
+ cli = requirements/cli.txt
+```
+
+### ⚠ ATTENTION
+
+#### The requirements files **MUST** be included in the wheel file aswell as the source tarball
+
+For the example shown above, in ``setup.cfg``, add something like:
+
+```ini
+[options.data_files]
+. = requirements/*.txt
+```
+
+Or something like the folowing on your ``MANIFEST.in``:
+
+```
+include requirements/*.txt
+```
+
+Or, if you use [setuptools-scm](https://pypi.org/project/setuptools-scm), the requirements files
+need to be committed to the SCM repo.
+
+
+## `pyproject.toml`
+Your `pyproject.toml` should also include `setuptools-declarative-requirements`:
+```toml
+[build-system]
+requires = ["setuptools>=50.3.2", "wheel", "setuptools-declarative-requirements"]
+build-backend = "setuptools.build_meta"
+```
+
+## `setup.py`
+Some projects still use a `setup.py` shim, similar to:
+```python
+#!/usr/bin/env python
+import setuptools
+
+if __name__ == "__main__":
+ setuptools.setup()
+```
+
+If this is your case, your `setup.cfg` needs an extra bit of tweak. Make sure you have
+``setuptools-declarative-requirements`` in your `setup_requires`:
+```ini
+[options]
+setup_requires =
+ setuptools>=50.3.2
+ setuptools-declarative-requirements
+```
+
+## Do Note That
+### ⚠ This project makes no attempt to validate your requirements files.
+**The only thing it does is include every non empty line from your requirements files which does
+not start with `#`, `-r` or `--`.**
+
+
+%package help
+Summary: Development documents and examples for setuptools-declarative-requirements
+Provides: python3-setuptools-declarative-requirements-doc
+%description help
+# Declarative `setuptools` Config Requirements Files Support
+
+This projects adds the ability for projects using setuptools declarative configuration
+to specify requirements using requirements files.
+
+### ⚠ **There's a reason why this isn't, at least yet, supported by default. Please [read why](https://github.com/pypa/setuptools/issues/1951).**
+
+Anyway, if you know what you're doing, then this library solves the missing feature
+of defining requirements using requirements files.
+
+## `setup.cfg`
+Your `setup.cfg` should include a section named `requirements-files`, like:
+
+```ini
+[requirements-files]
+setup_requires = requirements/setup.txt
+install_requires = requirements/base.txt
+tests_require = requirements/tests.txt
+extras_require =
+ docs = requirements/docs.txt
+ cli = requirements/cli.txt
+```
+
+### ⚠ ATTENTION
+
+#### The requirements files **MUST** be included in the wheel file aswell as the source tarball
+
+For the example shown above, in ``setup.cfg``, add something like:
+
+```ini
+[options.data_files]
+. = requirements/*.txt
+```
+
+Or something like the folowing on your ``MANIFEST.in``:
+
+```
+include requirements/*.txt
+```
+
+Or, if you use [setuptools-scm](https://pypi.org/project/setuptools-scm), the requirements files
+need to be committed to the SCM repo.
+
+
+## `pyproject.toml`
+Your `pyproject.toml` should also include `setuptools-declarative-requirements`:
+```toml
+[build-system]
+requires = ["setuptools>=50.3.2", "wheel", "setuptools-declarative-requirements"]
+build-backend = "setuptools.build_meta"
+```
+
+## `setup.py`
+Some projects still use a `setup.py` shim, similar to:
+```python
+#!/usr/bin/env python
+import setuptools
+
+if __name__ == "__main__":
+ setuptools.setup()
+```
+
+If this is your case, your `setup.cfg` needs an extra bit of tweak. Make sure you have
+``setuptools-declarative-requirements`` in your `setup_requires`:
+```ini
+[options]
+setup_requires =
+ setuptools>=50.3.2
+ setuptools-declarative-requirements
+```
+
+## Do Note That
+### ⚠ This project makes no attempt to validate your requirements files.
+**The only thing it does is include every non empty line from your requirements files which does
+not start with `#`, `-r` or `--`.**
+
+
+%prep
+%autosetup -n setuptools-declarative-requirements-1.3.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-setuptools-declarative-requirements -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.3.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..84a3f18
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+c3e620b62fdda54c80baae2609c4061f setuptools-declarative-requirements-1.3.0.tar.gz