python-dotenv/python-dotenv.spec
2022-11-09 18:02:50 +08:00

83 lines
2.6 KiB
RPMSpec

%global _empty_manifest_terminate_build 0
Name: python-dotenv
Version: 0.19.0
Release: 2
Summary: Read key-value pairs from a .env file and set them as environment variables
License: BSD-3-Clause
URL: https://github.com/theskumar/python-dotenv
Source0: https://github.com/theskumar/python-dotenv/archive/v%{version}/%{name}-%{version}.tar.gz
BuildArch: noarch
Requires: python3-click
%description
Python-dotenv reads key-value pairs from a .env file and can set them as environment variables. It helps in the development of applications following the 12-factor principles.
%package -n python3-dotenv
Summary: Read key-value pairs from a .env file and set them as environment variables
Provides: python-dotenv
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description -n python3-dotenv
Python-dotenv reads key-value pairs from a .env file and can set them as environment variables. It helps in the development of applications following the 12-factor principles.
%package help
Summary: Development documents and examples for python-dotenv
Provides: python3-dotenv-doc
%description help
Development documents and examples for python-dotenv.
%prep
%autosetup -n python-dotenv-0.19.0
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
sed -i 's/\(^.*$\)/"\1"/g' filelist.lst doclist.lst
find %{buildroot} -type f -exec file {} ';' | grep "\<ELF\>" | awk -F ':' '{print $1}' | xargs -i chrpath --delete "{}"
%files -n python3-dotenv -f filelist.lst
%license LICENSE
%doc README.md
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%license LICENSE
%{_docdir}/*
%changelog
* Wed Nov 9 2022 caodongxia <caodongxia@h-partners.com> - 0.19.0-2
- Modify invalid source0
* Sat Oct 09 2021 yinzehao <yinzehao@uniontech.com> - 0.19.0-1
- Package init.