commit f7df92ce3355158f6146e72ee490dd22bb1fc7fb Author: ultra_planet Date: Sat Nov 30 11:56:22 2019 +0800 package init diff --git a/distro-1.3.0.tar.gz b/distro-1.3.0.tar.gz new file mode 100644 index 0000000..5583eea Binary files /dev/null and b/distro-1.3.0.tar.gz differ diff --git a/python-distro.spec b/python-distro.spec new file mode 100644 index 0000000..59b44ca --- /dev/null +++ b/python-distro.spec @@ -0,0 +1,81 @@ +Name: python-distro +Version: 1.3.0 +Release: 5 +Summary: Linux Distribution - a Linux OS platform information API +License: ASL 2.0 +URL: https://github.com/nir0s/distro +Source0: https://files.pythonhosted.org/packages/source/d/distro/distro-%{version}.tar.gz + +BuildRequires: python2-devel python2-setuptools python2-pytest python3-devel python3-setuptools python3-pytest +BuildArch: noarch + +%description +Distro provides information about the OS distribution it runs on, such as a reliable machine-readable +ID, or version information. + +It is the recommended replacement for Python's original platform.linux_distribution function (which +will be removed in Python 3.8). It also provides much more functionality which isn't necessarily +Python bound, like a command-line interface. + +Distro currently supports Linux and BSD based systems but Windows and OS X support is also planned. + +%package -n python2-distro +Summary: Linux Distribution - a Linux OS platform information API +%{?python_provide:%python_provide python2-distro} + +%description -n python2-distro +Distro provides information about the OS distribution it runs on, such as a reliable machine-readable +ID, or version information. + +It is the recommended replacement for Python's original platform.linux_distribution function (which +will be removed in Python 3.8). It also provides much more functionality which isn't necessarily +Python bound, like a command-line interface. + +Distro currently supports Linux and BSD based systems but Windows and OS X support is also planned. + +Python2 version of distro. + +%package -n python3-distro +Summary: Linux Distribution - a Linux OS platform information API +%{?python_provide:%python_provide python3-distro} + +%description -n python3-distro +Distro provides information about the OS distribution it runs on, such as a reliable machine-readable +ID, or version information. + +It is the recommended replacement for Python's original platform.linux_distribution function (which +will be removed in Python 3.8). It also provides much more functionality which isn't necessarily +Python bound, like a command-line interface. + +Distro currently supports Linux and BSD based systems but Windows and OS X support is also planned. + +Python3 version of distro. + +%prep +%autosetup -n distro-%{version} -p1 +rm -rf distro.egg-info + +%build +%py2_build +%py3_build + +%install +%py2_install +%py3_install + +%check +%{__python2} -m pytest tests -v +%{__python3} -m pytest tests -v + +%files -n python2-distro +%doc LICENSE README.rst CHANGELOG.md CONTRIBUTORS.md README.md +%{python2_sitelib}/* + +%files -n python3-distro +%doc LICENSE README.rst CHANGELOG.md CONTRIBUTORS.md README.md +%{python3_sitelib}/* +%{_bindir}/distro + +%changelog +* Mon Nov 25 2019 lingsheng - 1.3.0-5 +- Package init