diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-11 22:29:23 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-11 22:29:23 +0000 |
| commit | 2253278a210ab6cdc210e5236090cd20aaeabc2f (patch) | |
| tree | abe3368b1ac3d6d0689cf9058ea7f6dac5a0aa11 | |
| parent | 07c82ef0f7776160925c2ab25636759455dd3188 (diff) | |
automatic import of python-dephell-pythons
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-dephell-pythons.spec | 261 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 263 insertions, 0 deletions
@@ -0,0 +1 @@ +/dephell_pythons-0.1.15.tar.gz diff --git a/python-dephell-pythons.spec b/python-dephell-pythons.spec new file mode 100644 index 0000000..fd78ac6 --- /dev/null +++ b/python-dephell-pythons.spec @@ -0,0 +1,261 @@ +%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 + + +[](https://travis-ci.org/dephell/dephell_pythons) +[](https://ci.appveyor.com/project/orsinium/dephell-pythons) +[](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 # <Version('3.7.0')> + +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 +# <Version('3.5.2')> + +# get by name +pythons.get_best('python3').version +# <Version('3.6.7')> + +# get by specifier +pythons.get_best('<3.7').version +# <Version('3.6.7')> + +# get by path +pythons.get_best('/usr/bin/python3.6').version +# <Version('3.6.7')> + +# get all +list(pythons) +# [Python(...), Python(...), ...] + +# work not only with installed pythons: +Pythons(abstract=True).get_best('>=2.8,<3.5').version +# <Version('3.4')> +``` + + +%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 + + +[](https://travis-ci.org/dephell/dephell_pythons) +[](https://ci.appveyor.com/project/orsinium/dephell-pythons) +[](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 # <Version('3.7.0')> + +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 +# <Version('3.5.2')> + +# get by name +pythons.get_best('python3').version +# <Version('3.6.7')> + +# get by specifier +pythons.get_best('<3.7').version +# <Version('3.6.7')> + +# get by path +pythons.get_best('/usr/bin/python3.6').version +# <Version('3.6.7')> + +# get all +list(pythons) +# [Python(...), Python(...), ...] + +# work not only with installed pythons: +Pythons(abstract=True).get_best('>=2.8,<3.5').version +# <Version('3.4')> +``` + + +%package help +Summary: Development documents and examples for dephell-pythons +Provides: python3-dephell-pythons-doc +%description help +# Dephell Pythons + + +[](https://travis-ci.org/dephell/dephell_pythons) +[](https://ci.appveyor.com/project/orsinium/dephell-pythons) +[](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 # <Version('3.7.0')> + +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 +# <Version('3.5.2')> + +# get by name +pythons.get_best('python3').version +# <Version('3.6.7')> + +# get by specifier +pythons.get_best('<3.7').version +# <Version('3.6.7')> + +# get by path +pythons.get_best('/usr/bin/python3.6').version +# <Version('3.6.7')> + +# get all +list(pythons) +# [Python(...), Python(...), ...] + +# work not only with installed pythons: +Pythons(abstract=True).get_best('>=2.8,<3.5').version +# <Version('3.4')> +``` + + +%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 <Python_Bot@openeuler.org> - 0.1.15-1 +- Package Spec generated @@ -0,0 +1 @@ +28de153d24f1e65bbaf5ab97e12082e4 dephell_pythons-0.1.15.tar.gz |
