python38-appdirs/python-appdirs.spec
2016-05-28 13:27:42 +04:00

102 lines
2.6 KiB
RPMSpec

%define oname appdirs
Name: python-%{oname}
Version: 1.4.0
Release: 1
Summary: A small Python module for determining appropriate platform-specific dirs
Source0: http://pypi.python.org/packages/source/a/%{oname}/%{oname}-%{version}.tar.gz
License: MIT
Group: Development/Python
Url: http://github.com/ActiveState/appdirs
BuildArch: noarch
BuildRequires: pythonegg(setuptools)
%description
What directory should your app use for storing user data?
This kind of thing is what the ``appdirs`` module is for.
``appdirs`` will help you choose an appropriate:
- user data dir (``user_data_dir``)
- user config dir (``user_config_dir``)
- user cache dir (``user_cache_dir``)
- site data dir (``site_data_dir``)
- site config dir (``site_config_dir``)
- user log dir (``user_log_dir``)
and also:
- is a single module so other Python packages can include their own
private copy
- is slightly opinionated on the directory names used. Look for "OPINION" in
documentation and code for when an opinion is being applied.
%files
%doc CHANGES.rst
%doc LICENSE.txt
%doc README.rst
%{py_puresitedir}/appdirs.py*
%{py_puresitedir}/appdirs*.egg-info
#----------------------------------------------------------------------------
%package -n python3-%{module}
Summary: A small Python module for determining appropriate platform-specific dirs
Group: Development/Python
BuildRequires: python3egg(setuptools)
%description -n python3-%{module}
What directory should your app use for storing user data?
This kind of thing is what the ``appdirs`` module is for.
``appdirs`` will help you choose an appropriate:
- user data dir (``user_data_dir``)
- user config dir (``user_config_dir``)
- user cache dir (``user_cache_dir``)
- site data dir (``site_data_dir``)
- site config dir (``site_config_dir``)
- user log dir (``user_log_dir``)
and also:
- is a single module so other Python packages can include their own
private copy
- is slightly opinionated on the directory names used. Look for "OPINION" in
documentation and code for when an opinion is being applied.
%files -n python3-%{module}
%doc CHANGES.rst
%doc LICENSE.txt
%doc README.rst
%{py3_puresitedir}/appdirs.py*
%{py3_puresitedir}/appdirs*.egg-info
#----------------------------------------------------------------------------
%prep
%setup -qn %{oname}-%{version}
cp -a . %{py3dir}
%build
python setup.py build
pushd %{py3dir}
python3 setup.py build
popd
%install
python setup.py install --root=%{buildroot}
pushd %{py3dir}
python3 setup.py install --root=%{buildroot}
popd
%check
python setup.py test
pushd %{py3dir}
python setup.py test
popd