From 32718997ac482ac6f18a945bcabae35eb6243975 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 9 Mar 2023 16:23:17 +0000 Subject: automatic import of python-repomd --- .gitignore | 1 + python-repomd.spec | 281 +++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 283 insertions(+) create mode 100644 python-repomd.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..c2f6267 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/repomd-0.2.1.tar.gz diff --git a/python-repomd.spec b/python-repomd.spec new file mode 100644 index 0000000..993b69b --- /dev/null +++ b/python-repomd.spec @@ -0,0 +1,281 @@ +%global _empty_manifest_terminate_build 0 +Name: python-repomd +Version: 0.2.1 +Release: 1 +Summary: Library for reading dnf/yum repositories +License: MIT +URL: https://github.com/carlwgeorge/repomd +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/54/ef/47155c061ac6cbdaa9b12f236474bb40f09a044f7ecb9d66d00d29a61496/repomd-0.2.1.tar.gz +BuildArch: noarch + +Requires: python3-defusedxml +Requires: python3-lxml +Requires: python3-pytest +Requires: python3-pytest-cov +Requires: python3-pytest-flake8 + +%description +[![build status](https://api.cirrus-ci.com/github/carlwgeorge/repomd.svg)](https://cirrus-ci.com/github/carlwgeorge/repomd/master) + +# repomd + +This library provides an object-oriented interface to get information out of dnf/yum repositories. + +## Usage + +```python +>>> import repomd + +>>> repo = repomd.load('https://mirror.rackspace.com/centos/7/updates/x86_64/') + +>>> repo + +``` + +The length of the `Repo` object indicates the number of packages in the repository. + +```python +>>> len(repo) +1602 +``` + +Find a package by name. + +```python +>>> repo.find('systemd') + +``` + +Find all packages of a given name. + +```python +>>> repo.findall('systemd') +[, ] +``` + +A `Package` instance has many useful properties. + +```python +>>> package = repo.find('systemd') + +>>> package.name +'systemd' + +>>> package.version +'219' + +>>> package.build_time +datetime.datetime(2018, 9, 26, 14, 11, 37) + +>>> package.nevr +'systemd-219-57.el7_5.3' +``` + +Iterate through packages in the repository. + +```python +>>> for package in repo: +... print(package.nvr) +389-ds-base-1.3.7.5-19.el7_5 +389-ds-base-1.3.7.5-21.el7_5 +389-ds-base-1.3.7.5-24.el7_5 +(and so on) +``` + + + + +%package -n python3-repomd +Summary: Library for reading dnf/yum repositories +Provides: python-repomd +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-repomd +[![build status](https://api.cirrus-ci.com/github/carlwgeorge/repomd.svg)](https://cirrus-ci.com/github/carlwgeorge/repomd/master) + +# repomd + +This library provides an object-oriented interface to get information out of dnf/yum repositories. + +## Usage + +```python +>>> import repomd + +>>> repo = repomd.load('https://mirror.rackspace.com/centos/7/updates/x86_64/') + +>>> repo + +``` + +The length of the `Repo` object indicates the number of packages in the repository. + +```python +>>> len(repo) +1602 +``` + +Find a package by name. + +```python +>>> repo.find('systemd') + +``` + +Find all packages of a given name. + +```python +>>> repo.findall('systemd') +[, ] +``` + +A `Package` instance has many useful properties. + +```python +>>> package = repo.find('systemd') + +>>> package.name +'systemd' + +>>> package.version +'219' + +>>> package.build_time +datetime.datetime(2018, 9, 26, 14, 11, 37) + +>>> package.nevr +'systemd-219-57.el7_5.3' +``` + +Iterate through packages in the repository. + +```python +>>> for package in repo: +... print(package.nvr) +389-ds-base-1.3.7.5-19.el7_5 +389-ds-base-1.3.7.5-21.el7_5 +389-ds-base-1.3.7.5-24.el7_5 +(and so on) +``` + + + + +%package help +Summary: Development documents and examples for repomd +Provides: python3-repomd-doc +%description help +[![build status](https://api.cirrus-ci.com/github/carlwgeorge/repomd.svg)](https://cirrus-ci.com/github/carlwgeorge/repomd/master) + +# repomd + +This library provides an object-oriented interface to get information out of dnf/yum repositories. + +## Usage + +```python +>>> import repomd + +>>> repo = repomd.load('https://mirror.rackspace.com/centos/7/updates/x86_64/') + +>>> repo + +``` + +The length of the `Repo` object indicates the number of packages in the repository. + +```python +>>> len(repo) +1602 +``` + +Find a package by name. + +```python +>>> repo.find('systemd') + +``` + +Find all packages of a given name. + +```python +>>> repo.findall('systemd') +[, ] +``` + +A `Package` instance has many useful properties. + +```python +>>> package = repo.find('systemd') + +>>> package.name +'systemd' + +>>> package.version +'219' + +>>> package.build_time +datetime.datetime(2018, 9, 26, 14, 11, 37) + +>>> package.nevr +'systemd-219-57.el7_5.3' +``` + +Iterate through packages in the repository. + +```python +>>> for package in repo: +... print(package.nvr) +389-ds-base-1.3.7.5-19.el7_5 +389-ds-base-1.3.7.5-21.el7_5 +389-ds-base-1.3.7.5-24.el7_5 +(and so on) +``` + + + + +%prep +%autosetup -n repomd-0.2.1 + +%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-repomd -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu Mar 09 2023 Python_Bot - 0.2.1-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..5becd01 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +3979bcf59644ead9fb3324fe36d183ed repomd-0.2.1.tar.gz -- cgit v1.2.3