From d6700da50e1ec3a2a91f70d6c688eab27cdeb9cb Mon Sep 17 00:00:00 2001 From: Julien Enselme Date: Thu, 2 Jul 2015 10:46:05 +0200 Subject: [PATCH] Initial import (#1231981) --- .gitignore | 1 + python-toml.spec | 84 ++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 86 insertions(+) create mode 100644 python-toml.spec diff --git a/.gitignore b/.gitignore index e69de29..7a1027d 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/toml-0.9.0.tar.gz diff --git a/python-toml.spec b/python-toml.spec new file mode 100644 index 0000000..51c3c67 --- /dev/null +++ b/python-toml.spec @@ -0,0 +1,84 @@ +%global pypi_name toml + +Name: python-%{pypi_name} +Version: 0.9.0 +Release: 2%{?dist} +Summary: Python Library for Tom's Obvious, Minimal Language + +License: MIT +URL: https://pypi.python.org/pypi/%{pypi_name} +Source0: https://pypi.python.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz + +BuildArch: noarch +BuildRequires: python2-devel + +%description +TOML aims to be a minimal configuration file format that's easy to read due to +obvious semantics. TOML is designed to map unambiguously to a hash table. TOML +should be easy to parse into data structures in a wide variety of languages. +This package loads toml file into python dictionary and dump dictionary into +toml file. + + +%package -n python3-%{pypi_name} +Summary: Python Library for Tom's Obvious, Minimal Language +BuildRequires: python3-devel + +%description -n python3-%{pypi_name} +TOML aims to be a minimal configuration file format that's easy to read due to +obvious semantics. TOML is designed to map unambiguously to a hash table. TOML +should be easy to parse into data structures in a wide variety of languages. +This package loads toml file into python dictionary and dump dictionary into +toml file. + + +%prep +%setup -q -n %{pypi_name}-%{version} +rm -rf %{py3dir} +cp -a . %{py3dir} + +%build +pushd %{py3dir} +%{__python3} setup.py build +popd + +%{__python2} setup.py build + + +%install +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root %{buildroot} +popd + +%{__python2} setup.py install -O1 --skip-build --root %{buildroot} + + +%check +# No test suite at present, so we'll just try importing +pushd %{py3dir} +PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -c "import toml" +popd + +PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} -c "import toml" + + +%files +%license LICENSE +%doc README.rst +%{python2_sitelib}/%{pypi_name}-%{version}-py%{python2_version}.egg-info +%{python2_sitelib}/%{pypi_name}.py* + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.rst +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info +%{python3_sitelib}/%{pypi_name}.py +%{python3_sitelib}/__pycache__/%{pypi_name}.cpython-*.py* + +%changelog +* Sun Jun 28 2015 Julien Enselme - 0.9.0-2 +- Update description to explain what toml is +- Try to import the package in %%check + +* Mon Jun 15 2015 Julien Enselme - 0.9.0-1 +- Initial packaging diff --git a/sources b/sources index e69de29..9afce7f 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +5d0175809af1ed1a56d8cc4e4b682580 toml-0.9.0.tar.gz