diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..413c3a4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/pipsi-0.9.tar.gz diff --git a/dead.package b/dead.package deleted file mode 100644 index 25a2c4e..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -EOL diff --git a/pipsi.spec b/pipsi.spec new file mode 100644 index 0000000..0ace3fd --- /dev/null +++ b/pipsi.spec @@ -0,0 +1,81 @@ +%global pypi_name pipsi + +# test suite is disabled by default for koji builds, +# because tests require internet connection + +# Conditial build macro +# http://www.rpm.org/wiki/PackagerDocs/ConditionalBuilds +%bcond_with tests + +Name: %{pypi_name} +Version: 0.9 +Release: 2%{?dist} +Summary: Wraps pip and virtualenv to install scripts + +License: BSD +URL: http://github.com/mitsuhiko/pipsi/ +Source0: https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-click +BuildRequires: python3-virtualenv + +%if %{with tests} +# Required for tests +BuildRequires: python3-pytest +BuildRequires: openssl-devel +BuildRequires: libacl-devel +%endif + +Requires: python3-click +Requires: python3-setuptools +Requires: python3-virtualenv + +%description +Pipsi is a wrapper around virtualenv and pip which installs scripts provided +by python packages into separate virtualenvs to shield them from your system +and each other. + + +%prep +%setup -q -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +# Point to Python 3 version of virtualenv executable +sed -i '233 s/virtualenv/py3-virtualenv/' %{pypi_name}.py +sed -i '70 s/virtualenv/py3-virtualenv/' get-%{pypi_name}.py + + +%build +%py3_build + + +%install +%py3_install + + +%if %{with tests} +%check +# Tests need UTF-8 encoding +export LC_CTYPE="C.UTF-8" +# Invoke tests and disable the test that checks if pipsi is already installed +%{__python3} -m pytest -k "not test_find_scripts" -vv +%endif + + +%files +%doc README.rst +%license LICENSE +%{_bindir}/pipsi +%{python3_sitelib}/%{pypi_name}.py +%{python3_sitelib}/__pycache__/* +%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info + +%changelog +* Wed Apr 13 2016 Charalampos Stratakis - 0.9-2 +- Disable test suite for koji builds. + +* Thu Apr 07 2016 Charalampos Stratakis - 0.9-1 +- Initial package. \ No newline at end of file diff --git a/sources b/sources new file mode 100644 index 0000000..74cda1e --- /dev/null +++ b/sources @@ -0,0 +1 @@ +1c71c7a29d92a17d9cfc7bba12721d06 pipsi-0.9.tar.gz