diff options
Diffstat (limited to 'python-tox-pyenv.spec')
| -rw-r--r-- | python-tox-pyenv.spec | 289 |
1 files changed, 289 insertions, 0 deletions
diff --git a/python-tox-pyenv.spec b/python-tox-pyenv.spec new file mode 100644 index 0000000..67fef4b --- /dev/null +++ b/python-tox-pyenv.spec @@ -0,0 +1,289 @@ +%global _empty_manifest_terminate_build 0 +Name: python-tox-pyenv +Version: 1.1.0 +Release: 1 +Summary: tox plugin that makes tox use `pyenv which` to find python executables +License: Apache License, Version 2.0 +URL: https://github.com/samstav/tox-pyenv +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/16/0e/0208374ee677ccb9dbb4e9bc23f6d304bef6b881cc6ccb8bec2ae81b1e99/tox-pyenv-1.1.0.tar.gz +BuildArch: noarch + +Requires: python3-tox + +%description +| |latest| |Circle CI| +Plugin that tells `tox <https://tox.readthedocs.org/en/latest/>`__ to +use `pyenv which <https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-which>`__ +to `find python +executables <https://testrun.org/tox/latest/plugins.html#tox.hookspecs.tox_get_python_executable>`__ +Your project's `circle.yml <https://circleci.com/docs/configuration>`__ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +In order for ``tox`` to have the versions of python you want available, +set them using +`pyenv local <https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-local>`__ + dependencies: + override: + - pip install tox tox-pyenv + - pyenv local 2.7.9 3.4.3 3.5.0 +The versions passed to ``pyenv local`` must be +`installed <https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-install>`__ +for this to work. See `CircleCI Preinstalled Python +Versions <#circleci-preinstalled-python-versions>`__ for a list. +Corresponding `tox.ini <https://tox.readthedocs.org/en/latest/config.html>`__ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + [tox] + envlist = py27,py34,py35 +The result of the setup above means running ``tox`` will run tests +against python 2.7.9, python 3.4.3 and python 3.5.0, assuming those +versions of python have been +`pyenv install <https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-install>`__\ed. +notes +^^^^^ +If you want tox to *exclusively* use ``pyenv which`` to find +executables, you will need use the ``--tox-pyenv-no-fallback`` command +line option, or set ``tox_pyenv_fallback=False`` in your tox.ini. By +default, if ``tox-pyenv`` fails to find a python executable it will +fallback to tox's built-in strategy. +CircleCI Preinstalled Python Versions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Here is the list of python versions that are *pre-installed* in the +CircleCI build environment (as of 09/27/2017): + $ pyenv versions + system + 2.6.6 + 2.6.8 + 2.7 + 2.7.10 + 2.7.11 + 2.7.3 + 2.7.4 + 2.7.5 + 2.7.6 + 2.7.7 + 2.7.8 + * 2.7.9 (set by /home/ubuntu/.pyenv/version) + 3.1.5 + 3.2 + 3.2.5 + 3.3.0 + 3.3.2 + 3.3.3 + 3.4.0 + 3.4.1 + 3.4.2 + 3.4.3 + 3.5.0 + pypy-2.2.1 + pypy-2.3.1 + pypy-2.4.0 + pypy-2.5.0 +If the version you need isn't in the list, such as Python ``3.6-dev`` +include an ``install`` step: + dependencies: + override: + - pip install tox tox-pyenv + - pyenv install --skip-existing 3.6-dev + - pyenv local 3.6-dev + +%package -n python3-tox-pyenv +Summary: tox plugin that makes tox use `pyenv which` to find python executables +Provides: python-tox-pyenv +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-tox-pyenv +| |latest| |Circle CI| +Plugin that tells `tox <https://tox.readthedocs.org/en/latest/>`__ to +use `pyenv which <https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-which>`__ +to `find python +executables <https://testrun.org/tox/latest/plugins.html#tox.hookspecs.tox_get_python_executable>`__ +Your project's `circle.yml <https://circleci.com/docs/configuration>`__ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +In order for ``tox`` to have the versions of python you want available, +set them using +`pyenv local <https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-local>`__ + dependencies: + override: + - pip install tox tox-pyenv + - pyenv local 2.7.9 3.4.3 3.5.0 +The versions passed to ``pyenv local`` must be +`installed <https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-install>`__ +for this to work. See `CircleCI Preinstalled Python +Versions <#circleci-preinstalled-python-versions>`__ for a list. +Corresponding `tox.ini <https://tox.readthedocs.org/en/latest/config.html>`__ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + [tox] + envlist = py27,py34,py35 +The result of the setup above means running ``tox`` will run tests +against python 2.7.9, python 3.4.3 and python 3.5.0, assuming those +versions of python have been +`pyenv install <https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-install>`__\ed. +notes +^^^^^ +If you want tox to *exclusively* use ``pyenv which`` to find +executables, you will need use the ``--tox-pyenv-no-fallback`` command +line option, or set ``tox_pyenv_fallback=False`` in your tox.ini. By +default, if ``tox-pyenv`` fails to find a python executable it will +fallback to tox's built-in strategy. +CircleCI Preinstalled Python Versions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Here is the list of python versions that are *pre-installed* in the +CircleCI build environment (as of 09/27/2017): + $ pyenv versions + system + 2.6.6 + 2.6.8 + 2.7 + 2.7.10 + 2.7.11 + 2.7.3 + 2.7.4 + 2.7.5 + 2.7.6 + 2.7.7 + 2.7.8 + * 2.7.9 (set by /home/ubuntu/.pyenv/version) + 3.1.5 + 3.2 + 3.2.5 + 3.3.0 + 3.3.2 + 3.3.3 + 3.4.0 + 3.4.1 + 3.4.2 + 3.4.3 + 3.5.0 + pypy-2.2.1 + pypy-2.3.1 + pypy-2.4.0 + pypy-2.5.0 +If the version you need isn't in the list, such as Python ``3.6-dev`` +include an ``install`` step: + dependencies: + override: + - pip install tox tox-pyenv + - pyenv install --skip-existing 3.6-dev + - pyenv local 3.6-dev + +%package help +Summary: Development documents and examples for tox-pyenv +Provides: python3-tox-pyenv-doc +%description help +| |latest| |Circle CI| +Plugin that tells `tox <https://tox.readthedocs.org/en/latest/>`__ to +use `pyenv which <https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-which>`__ +to `find python +executables <https://testrun.org/tox/latest/plugins.html#tox.hookspecs.tox_get_python_executable>`__ +Your project's `circle.yml <https://circleci.com/docs/configuration>`__ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +In order for ``tox`` to have the versions of python you want available, +set them using +`pyenv local <https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-local>`__ + dependencies: + override: + - pip install tox tox-pyenv + - pyenv local 2.7.9 3.4.3 3.5.0 +The versions passed to ``pyenv local`` must be +`installed <https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-install>`__ +for this to work. See `CircleCI Preinstalled Python +Versions <#circleci-preinstalled-python-versions>`__ for a list. +Corresponding `tox.ini <https://tox.readthedocs.org/en/latest/config.html>`__ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + [tox] + envlist = py27,py34,py35 +The result of the setup above means running ``tox`` will run tests +against python 2.7.9, python 3.4.3 and python 3.5.0, assuming those +versions of python have been +`pyenv install <https://github.com/yyuu/pyenv/blob/master/COMMANDS.md#pyenv-install>`__\ed. +notes +^^^^^ +If you want tox to *exclusively* use ``pyenv which`` to find +executables, you will need use the ``--tox-pyenv-no-fallback`` command +line option, or set ``tox_pyenv_fallback=False`` in your tox.ini. By +default, if ``tox-pyenv`` fails to find a python executable it will +fallback to tox's built-in strategy. +CircleCI Preinstalled Python Versions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Here is the list of python versions that are *pre-installed* in the +CircleCI build environment (as of 09/27/2017): + $ pyenv versions + system + 2.6.6 + 2.6.8 + 2.7 + 2.7.10 + 2.7.11 + 2.7.3 + 2.7.4 + 2.7.5 + 2.7.6 + 2.7.7 + 2.7.8 + * 2.7.9 (set by /home/ubuntu/.pyenv/version) + 3.1.5 + 3.2 + 3.2.5 + 3.3.0 + 3.3.2 + 3.3.3 + 3.4.0 + 3.4.1 + 3.4.2 + 3.4.3 + 3.5.0 + pypy-2.2.1 + pypy-2.3.1 + pypy-2.4.0 + pypy-2.5.0 +If the version you need isn't in the list, such as Python ``3.6-dev`` +include an ``install`` step: + dependencies: + override: + - pip install tox tox-pyenv + - pyenv install --skip-existing 3.6-dev + - pyenv local 3.6-dev + +%prep +%autosetup -n tox-pyenv-1.1.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-tox-pyenv -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.0-1 +- Package Spec generated |
