%global _empty_manifest_terminate_build 0 Name: python-dephell-pythons Version: 0.1.15 Release: 1 Summary: Work with python versions License: MIT URL: https://pypi.org/project/dephell-pythons/ Source0: https://mirrors.nju.edu.cn/pypi/web/packages/6d/fa/d0a59abf5b4b30445efb13ea3168a0f2b0371f156adcc17d80bacceb9c10/dephell_pythons-0.1.15.tar.gz BuildArch: noarch Requires: python3-attrs Requires: python3-dephell-specifier Requires: python3-packaging %description # Dephell Pythons [![travis](https://travis-ci.org/dephell/dephell_pythons.svg?branch=master)](https://travis-ci.org/dephell/dephell_pythons) [![appveyor](https://ci.appveyor.com/api/projects/status/github/dephell/dephell_pythons?svg=true)](https://ci.appveyor.com/project/orsinium/dephell-pythons) [![MIT License](https://img.shields.io/pypi/l/dephell-pythons.svg)](https://github.com/dephell/dephell_pythons/blob/master/LICENSE) Work with python versions. ## Installation Install from [PyPI](https://pypi.org/project/dephell-pythons/): ```bash python3 -m pip install --user dephell_pythons ``` ## Usage ```python from dephell_pythons import Pythons pythons = Pythons() # get current: python = pythons.get_best() # properties: python.name # 'python3.7' python.path # Path('/usr/local/bin/python3.7') python.version # python.lib_paths # [Path('/usr/local/lib/python37.zip'), Path('/usr/local/lib/python3.7'), ...] python.lib_path # Path('/home/gram/.local/lib/python3.7/site-packages') # get by version pythons.get_best('3.5').version # # get by name pythons.get_best('python3').version # # get by specifier pythons.get_best('<3.7').version # # get by path pythons.get_best('/usr/bin/python3.6').version # # get all list(pythons) # [Python(...), Python(...), ...] # work not only with installed pythons: Pythons(abstract=True).get_best('>=2.8,<3.5').version # ``` %package -n python3-dephell-pythons Summary: Work with python versions Provides: python-dephell-pythons BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-dephell-pythons # Dephell Pythons [![travis](https://travis-ci.org/dephell/dephell_pythons.svg?branch=master)](https://travis-ci.org/dephell/dephell_pythons) [![appveyor](https://ci.appveyor.com/api/projects/status/github/dephell/dephell_pythons?svg=true)](https://ci.appveyor.com/project/orsinium/dephell-pythons) [![MIT License](https://img.shields.io/pypi/l/dephell-pythons.svg)](https://github.com/dephell/dephell_pythons/blob/master/LICENSE) Work with python versions. ## Installation Install from [PyPI](https://pypi.org/project/dephell-pythons/): ```bash python3 -m pip install --user dephell_pythons ``` ## Usage ```python from dephell_pythons import Pythons pythons = Pythons() # get current: python = pythons.get_best() # properties: python.name # 'python3.7' python.path # Path('/usr/local/bin/python3.7') python.version # python.lib_paths # [Path('/usr/local/lib/python37.zip'), Path('/usr/local/lib/python3.7'), ...] python.lib_path # Path('/home/gram/.local/lib/python3.7/site-packages') # get by version pythons.get_best('3.5').version # # get by name pythons.get_best('python3').version # # get by specifier pythons.get_best('<3.7').version # # get by path pythons.get_best('/usr/bin/python3.6').version # # get all list(pythons) # [Python(...), Python(...), ...] # work not only with installed pythons: Pythons(abstract=True).get_best('>=2.8,<3.5').version # ``` %package help Summary: Development documents and examples for dephell-pythons Provides: python3-dephell-pythons-doc %description help # Dephell Pythons [![travis](https://travis-ci.org/dephell/dephell_pythons.svg?branch=master)](https://travis-ci.org/dephell/dephell_pythons) [![appveyor](https://ci.appveyor.com/api/projects/status/github/dephell/dephell_pythons?svg=true)](https://ci.appveyor.com/project/orsinium/dephell-pythons) [![MIT License](https://img.shields.io/pypi/l/dephell-pythons.svg)](https://github.com/dephell/dephell_pythons/blob/master/LICENSE) Work with python versions. ## Installation Install from [PyPI](https://pypi.org/project/dephell-pythons/): ```bash python3 -m pip install --user dephell_pythons ``` ## Usage ```python from dephell_pythons import Pythons pythons = Pythons() # get current: python = pythons.get_best() # properties: python.name # 'python3.7' python.path # Path('/usr/local/bin/python3.7') python.version # python.lib_paths # [Path('/usr/local/lib/python37.zip'), Path('/usr/local/lib/python3.7'), ...] python.lib_path # Path('/home/gram/.local/lib/python3.7/site-packages') # get by version pythons.get_best('3.5').version # # get by name pythons.get_best('python3').version # # get by specifier pythons.get_best('<3.7').version # # get by path pythons.get_best('/usr/bin/python3.6').version # # get all list(pythons) # [Python(...), Python(...), ...] # work not only with installed pythons: Pythons(abstract=True).get_best('>=2.8,<3.5').version # ``` %prep %autosetup -n dephell-pythons-0.1.15 %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-dephell-pythons -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue Apr 11 2023 Python_Bot - 0.1.15-1 - Package Spec generated