summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-03-09 16:23:17 +0000
committerCoprDistGit <infra@openeuler.org>2023-03-09 16:23:17 +0000
commit32718997ac482ac6f18a945bcabae35eb6243975 (patch)
tree7da94e4803d3940f7e88c9dbd6b9989f4f989072
parentf0627fafff5230dd230fb235997f509ef2d4d073 (diff)
automatic import of python-repomd
-rw-r--r--.gitignore1
-rw-r--r--python-repomd.spec281
-rw-r--r--sources1
3 files changed, 283 insertions, 0 deletions
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
+<Repo: "https://mirror.rackspace.com/centos/7/updates/x86_64/">
+```
+
+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')
+<Package: "systemd-219-57.el7_5.3.x86_64">
+```
+
+Find all packages of a given name.
+
+```python
+>>> repo.findall('systemd')
+[<Package: "systemd-219-57.el7_5.1.x86_64">, <Package: "systemd-219-57.el7_5.3.x86_64">]
+```
+
+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
+<Repo: "https://mirror.rackspace.com/centos/7/updates/x86_64/">
+```
+
+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')
+<Package: "systemd-219-57.el7_5.3.x86_64">
+```
+
+Find all packages of a given name.
+
+```python
+>>> repo.findall('systemd')
+[<Package: "systemd-219-57.el7_5.1.x86_64">, <Package: "systemd-219-57.el7_5.3.x86_64">]
+```
+
+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
+<Repo: "https://mirror.rackspace.com/centos/7/updates/x86_64/">
+```
+
+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')
+<Package: "systemd-219-57.el7_5.3.x86_64">
+```
+
+Find all packages of a given name.
+
+```python
+>>> repo.findall('systemd')
+[<Package: "systemd-219-57.el7_5.1.x86_64">, <Package: "systemd-219-57.el7_5.3.x86_64">]
+```
+
+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 <Python_Bot@openeuler.org> - 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