summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-10 20:15:09 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-10 20:15:09 +0000
commitd77945a8a6dd161179ad7ea1b32722a32ab87c1b (patch)
tree29cdf6159fa465baf6fe7e52fc5898f9c5365d0d
parent0fd416706a43627cf69c4392673b23c090eff036 (diff)
automatic import of python-tox-pip-version
-rw-r--r--.gitignore1
-rw-r--r--python-tox-pip-version.spec231
-rw-r--r--sources1
3 files changed, 233 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..2ef2a6f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/tox-pip-version-0.0.7.tar.gz
diff --git a/python-tox-pip-version.spec b/python-tox-pip-version.spec
new file mode 100644
index 0000000..a9ca20b
--- /dev/null
+++ b/python-tox-pip-version.spec
@@ -0,0 +1,231 @@
+%global _empty_manifest_terminate_build 0
+Name: python-tox-pip-version
+Version: 0.0.7
+Release: 1
+Summary: Select PIP version to use with tox
+License: MIT
+URL: https://github.com/pglass/tox-pip-version
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/3c/a1/49c1c3ab6140e72a3ad0439c9dded0f1dae4e5e340f573a5f081b4989b30/tox-pip-version-0.0.7.tar.gz
+BuildArch: noarch
+
+
+%description
+This is a tox plugin that preinstalls a specific version of pip in each tox
+environment.
+```bash
+pip install tox-pip-version
+```
+This works around the default behavior of tox/virtualenv that always installs
+the latest version pip. It is an improvment over the `VIRTUALENV_NO_DOWNLOAD=1`
+option that does not install the latest version, but could result in usage of
+an outdated version of pip.
+*Recommendation*: Do not pin the pip version long term. You get more stable
+repeatable builds, but at the cost of using an outdated (possibly vulnerable)
+package. This should be used as a temporary fix for breakages in upstream pip,
+or in conjunction with a regular process to update the version pin.
+*Note*: This relies on an [unstable tox plugin interface](
+https://tox.readthedocs.io/en/latest/plugins.html#tox.hookspecs.tox_testenv_create).
+You may experience breakage with new tox versions. If you do, please feel
+free to [report the issue](https://github.com/pglass/tox-pip-version/issues/new)
+on Github.
+### Usage
+Install the package and include `pip_version` in your tox.ini
+```tox
+[testenv]
+pip_version = pip==19.0.1
+```
+Or, set the `TOX_PIP_VERSION` environment variable,
+```bash
+export TOX_PIP_VERSION=18.1
+tox
+```
+The plugin will install that version of pip into the tox-created virtualenv,
+just after tox creates the virtualenv, but before dependencies are installed.
+The `pip_version` within tox.ini, if present, is always used over the
+environment variable.
+If neither `pip_version` or `TOX_PIP_VERSION` is present, the plugin does
+nothing.
+### Version Sets
+Version sets/ranges are supported, enabling installation of a version of pip
+matching a set of specifiers. There are two basic formats: a plain version
+number, or the package name with optional [PEP440-compatible](
+https://www.python.org/dev/peps/pep-0440/#version-specifiers) version
+specifiers.
+| tox.ini | effective pip command |
+| ---------------------------- | ---------------------------- |
+| `pip_version = 19.0` | `pip install -U pip==19.0` |
+| `pip_version = pip==19.0` | `pip install -U pip==19.0` |
+| `pip_version = pip>=19.0` | `pip install -U pip>=19.0` |
+| `pip_version = pip!=19,>18` | `pip install -U pip!=19,>18` |
+| `pip_version = pip` | `pip install -U pip` |
+### Tests
+Use `make test` to run the tests, which includes linting and functional tests.
+Each of the `tests/*` directories is a "feature" that needs testing. Each
+feature sub-directory contains a tox.ini file that sets pip version in a
+particular way, and then uses a tox command to check the correct pip version
+was installed.
+
+%package -n python3-tox-pip-version
+Summary: Select PIP version to use with tox
+Provides: python-tox-pip-version
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-tox-pip-version
+This is a tox plugin that preinstalls a specific version of pip in each tox
+environment.
+```bash
+pip install tox-pip-version
+```
+This works around the default behavior of tox/virtualenv that always installs
+the latest version pip. It is an improvment over the `VIRTUALENV_NO_DOWNLOAD=1`
+option that does not install the latest version, but could result in usage of
+an outdated version of pip.
+*Recommendation*: Do not pin the pip version long term. You get more stable
+repeatable builds, but at the cost of using an outdated (possibly vulnerable)
+package. This should be used as a temporary fix for breakages in upstream pip,
+or in conjunction with a regular process to update the version pin.
+*Note*: This relies on an [unstable tox plugin interface](
+https://tox.readthedocs.io/en/latest/plugins.html#tox.hookspecs.tox_testenv_create).
+You may experience breakage with new tox versions. If you do, please feel
+free to [report the issue](https://github.com/pglass/tox-pip-version/issues/new)
+on Github.
+### Usage
+Install the package and include `pip_version` in your tox.ini
+```tox
+[testenv]
+pip_version = pip==19.0.1
+```
+Or, set the `TOX_PIP_VERSION` environment variable,
+```bash
+export TOX_PIP_VERSION=18.1
+tox
+```
+The plugin will install that version of pip into the tox-created virtualenv,
+just after tox creates the virtualenv, but before dependencies are installed.
+The `pip_version` within tox.ini, if present, is always used over the
+environment variable.
+If neither `pip_version` or `TOX_PIP_VERSION` is present, the plugin does
+nothing.
+### Version Sets
+Version sets/ranges are supported, enabling installation of a version of pip
+matching a set of specifiers. There are two basic formats: a plain version
+number, or the package name with optional [PEP440-compatible](
+https://www.python.org/dev/peps/pep-0440/#version-specifiers) version
+specifiers.
+| tox.ini | effective pip command |
+| ---------------------------- | ---------------------------- |
+| `pip_version = 19.0` | `pip install -U pip==19.0` |
+| `pip_version = pip==19.0` | `pip install -U pip==19.0` |
+| `pip_version = pip>=19.0` | `pip install -U pip>=19.0` |
+| `pip_version = pip!=19,>18` | `pip install -U pip!=19,>18` |
+| `pip_version = pip` | `pip install -U pip` |
+### Tests
+Use `make test` to run the tests, which includes linting and functional tests.
+Each of the `tests/*` directories is a "feature" that needs testing. Each
+feature sub-directory contains a tox.ini file that sets pip version in a
+particular way, and then uses a tox command to check the correct pip version
+was installed.
+
+%package help
+Summary: Development documents and examples for tox-pip-version
+Provides: python3-tox-pip-version-doc
+%description help
+This is a tox plugin that preinstalls a specific version of pip in each tox
+environment.
+```bash
+pip install tox-pip-version
+```
+This works around the default behavior of tox/virtualenv that always installs
+the latest version pip. It is an improvment over the `VIRTUALENV_NO_DOWNLOAD=1`
+option that does not install the latest version, but could result in usage of
+an outdated version of pip.
+*Recommendation*: Do not pin the pip version long term. You get more stable
+repeatable builds, but at the cost of using an outdated (possibly vulnerable)
+package. This should be used as a temporary fix for breakages in upstream pip,
+or in conjunction with a regular process to update the version pin.
+*Note*: This relies on an [unstable tox plugin interface](
+https://tox.readthedocs.io/en/latest/plugins.html#tox.hookspecs.tox_testenv_create).
+You may experience breakage with new tox versions. If you do, please feel
+free to [report the issue](https://github.com/pglass/tox-pip-version/issues/new)
+on Github.
+### Usage
+Install the package and include `pip_version` in your tox.ini
+```tox
+[testenv]
+pip_version = pip==19.0.1
+```
+Or, set the `TOX_PIP_VERSION` environment variable,
+```bash
+export TOX_PIP_VERSION=18.1
+tox
+```
+The plugin will install that version of pip into the tox-created virtualenv,
+just after tox creates the virtualenv, but before dependencies are installed.
+The `pip_version` within tox.ini, if present, is always used over the
+environment variable.
+If neither `pip_version` or `TOX_PIP_VERSION` is present, the plugin does
+nothing.
+### Version Sets
+Version sets/ranges are supported, enabling installation of a version of pip
+matching a set of specifiers. There are two basic formats: a plain version
+number, or the package name with optional [PEP440-compatible](
+https://www.python.org/dev/peps/pep-0440/#version-specifiers) version
+specifiers.
+| tox.ini | effective pip command |
+| ---------------------------- | ---------------------------- |
+| `pip_version = 19.0` | `pip install -U pip==19.0` |
+| `pip_version = pip==19.0` | `pip install -U pip==19.0` |
+| `pip_version = pip>=19.0` | `pip install -U pip>=19.0` |
+| `pip_version = pip!=19,>18` | `pip install -U pip!=19,>18` |
+| `pip_version = pip` | `pip install -U pip` |
+### Tests
+Use `make test` to run the tests, which includes linting and functional tests.
+Each of the `tests/*` directories is a "feature" that needs testing. Each
+feature sub-directory contains a tox.ini file that sets pip version in a
+particular way, and then uses a tox command to check the correct pip version
+was installed.
+
+%prep
+%autosetup -n tox-pip-version-0.0.7
+
+%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-tox-pip-version -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.7-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..422f00c
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+a92bb40a16e1f818c350828a88598c6a tox-pip-version-0.0.7.tar.gz