%global pypi_name nodeenv %if 0%{?fedora} %global with_python3 1 %endif Name: python-%{pypi_name} Version: 0.13.6 Release: 2%{?dist} Summary: Node.js virtual environment builder License: BSD URL: https://github.com/ekalinin/nodeenv Source0: https://pypi.python.org/packages/source/n/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %description nodeenv (node.js virtual environment) is a tool to create isolated node.js environments. It creates an environment that has its own installation directories, that doesn’t share libraries with other node.js virtual environments. %package -n python2-%{pypi_name} Summary: Node.js virtual environment builder %{?python_provide:%python_provide python2-%{pypi_name}} BuildRequires: python2-devel BuildRequires: python-setuptools Requires: python-setuptools # test dependencies BuildRequires: python-coverage BuildRequires: python-flake8 BuildRequires: python-mock BuildRequires: pytest %description -n python2-%{pypi_name} nodeenv (node.js virtual environment) is a tool to create isolated node.js environments. It creates an environment that has its own installation directories, that doesn’t share libraries with other node.js virtual environments. %if 0%{with_python3} %package -n python3-%{pypi_name} Summary: Node.js virtual environment builder %{?python_provide:%python_provide python3-%{pypi_name}} BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-setuptools # test dependencies BuildRequires: python3-coverage BuildRequires: python3-flake8 BuildRequires: python3-mock BuildRequires: python3-pytest %description -n python3-%{pypi_name} nodeenv (node.js virtual environment) is a tool to create isolated node.js environments. It creates an environment that has its own installation directories, that doesn’t share libraries with other node.js virtual environments. %endif %prep %setup -q -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %if 0%{with_python3} %py3_build %endif %install %py2_install chmod +x %{buildroot}/%{python2_sitelib}/%{pypi_name}.py %if 0%{with_python3} %py3_install chmod +x %{buildroot}/%{python3_sitelib}/%{pypi_name}.py %endif %check %{__python2} setup.py test %if 0%{with_python3} %{__python3} setup.py test %endif %files -n python2-%{pypi_name} %doc README.rst %license LICENSE %{_bindir}/%{pypi_name} %{python2_sitelib}/%{pypi_name}.py* %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %if 0%{with_python3} %files -n python3-%{pypi_name} %doc README.rst %license LICENSE %{_bindir}/%{pypi_name} %{python3_sitelib}/%{pypi_name}.py* %{python3_sitelib}/__pycache__/* %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %endif %changelog * Wed Sep 30 2015 Chandan Kumar - 0.13.6-2 - Fixed files duplication * Tue Sep 29 2015 Chandan Kumar - 0.13.6-1 - Added python2 and python3 subpackge * Wed Aug 12 2015 chandankumar - 0.13.3-1 - Initial package.