Open radomirbosak opened 8 years ago
Nice, I didn't know this.
I tried the command (outside of the virtualenv) and it worked :)
Although.. I don't know if the produced rpm package (although functional) is correctly packaged for Fedora or RHEL. By looking at the generated .spec file, it looks like it's not using any system-packaged libraries.
%define name duden
%define version 0.10.0
%define unmangled_version 0.10.0
%define unmangled_version 0.10.0
%define release 1
Summary: CLI-based german dictionary
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{unmangled_version}.tar.gz
License: MIT
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: Radomír Bosák <radomir.bosak@gmail.com>
Url: https://github.com/radomirbosak/duden
%description
UNKNOWN
%prep
%setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version}
%build
python3 setup.py build
%install
python3 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
%clean
rm -rf $RPM_BUILD_ROOT
%files -f INSTALLED_FILES
%defattr(-,root,root)
When installing the rpm package though sudo, the root-owner dependencies might cause some damage (friends told me to never use sudo pip install
).
In any case, with next release of duden
, I can include an rpm file too (maybe with a warning).
Apparently, you can execute
python setup.py bdist --format=rpm
. See https://docs.python.org/3.3/distutils/builtdist.html