| |
@@ -42,6 +42,15 @@
|
| |
Requires: which
|
| |
%{?python_provide:%python_provide python3-%{modname}}
|
| |
|
| |
+ # The python2 subpackage was dropped on F30 and the
|
| |
+ # unversioned shell scripts were moved to the python3
|
| |
+ # subpackage.
|
| |
+ # A conflicts tag was added, to mark when the change
|
| |
+ # happened, which in conjunction with an entry at
|
| |
+ # fedora-obsolete-packages should provide a clean
|
| |
+ # upgrade path.
|
| |
+ Conflicts: python2-%{modname} < 4.8.2-7
|
| |
+
|
| |
%description -n python3-%{modname}
|
| |
%{desc}
|
| |
|
| |
@@ -50,9 +59,6 @@
|
| |
rm -rf %{modname}.egg-info
|
| |
# Fix default binaries
|
| |
%patch0 -p1 -b .default-binaries
|
| |
- # Copy patched version
|
| |
- cp %{modname}.sh %{modname}-3.sh
|
| |
- cp %{modname}_lazy.sh %{modname}_lazy-3.sh
|
| |
|
| |
%build
|
| |
%py3_build
|
| |
@@ -60,19 +66,15 @@
|
| |
%install
|
| |
%py3_install
|
| |
|
| |
- # Install both versions of shell scripts
|
| |
- install -m 0755 %{modname}-3.sh %{buildroot}/%{_bindir}/%{modname}-3.sh
|
| |
- install -m 0755 %{modname}_lazy-3.sh %{buildroot}/%{_bindir}/%{modname}_lazy-3.sh
|
| |
-
|
| |
# Prepend a shebang to these so they are not stripped of executable bits
|
| |
- sed -i '1i #!/bin/sh' %{buildroot}/%{_bindir}/%{modname}-3.sh
|
| |
-
|
| |
- # Remove installed version
|
| |
- rm %{buildroot}/%{_bindir}/%{modname}.sh
|
| |
- rm %{buildroot}/%{_bindir}/%{modname}_lazy.sh
|
| |
+ sed -i '1i #!/bin/sh' %{buildroot}/%{_bindir}/%{modname}.sh
|
| |
|
| |
%{__mkdir_p} %{buildroot}/%{_sysconfdir}/profile.d/
|
| |
- ln -s %{_bindir}/virtualenvwrapper_lazy-3.sh %{buildroot}/%{_sysconfdir}/profile.d/virtualenvwrapper-3.sh
|
| |
+ ln -s %{_bindir}/virtualenvwrapper_lazy.sh %{buildroot}/%{_sysconfdir}/profile.d/virtualenvwrapper.sh
|
| |
+
|
| |
+ ln -s %{_bindir}/virtualenvwrapper_lazy.sh %{buildroot}/%{_bindir}/virtualenvwrapper_lazy-3.sh
|
| |
+ ln -s %{_bindir}/virtualenvwrapper.sh %{buildroot}/%{_bindir}/virtualenvwrapper-3.sh
|
| |
+
|
| |
|
| |
#%%check
|
| |
# Tests won't fly in koji since they try to install stuff from pypi
|
| |
@@ -80,11 +82,14 @@
|
| |
|
| |
%files -n python3-%{modname}
|
| |
%doc PKG-INFO docs
|
| |
+ %license LICENSE
|
| |
%{python3_sitelib}/%{modname}
|
| |
%{python3_sitelib}/%{modname}-%{version}*
|
| |
+ %{_bindir}/virtualenvwrapper.sh
|
| |
+ %{_bindir}/virtualenvwrapper_lazy.sh
|
| |
%{_bindir}/virtualenvwrapper-3.sh
|
| |
%{_bindir}/virtualenvwrapper_lazy-3.sh
|
| |
- %config(noreplace) %{_sysconfdir}/profile.d/virtualenvwrapper-3.sh
|
| |
+ %config(noreplace) %{_sysconfdir}/profile.d/virtualenvwrapper.sh
|
| |
|
| |
%changelog
|
| |
* Thu Nov 22 2018 Charalampos Stratakis <cstratak@redhat.com> - 4.8.2-8
|
| |
Due to moving the unversioned scripts to the python3 subpackage, this package now conflicts with its python2 equivalent. I added a conflicts tag for a more informative dnf output, however the python2 subpackage should be added to fedora-obsolete packages. As it stands, the upgrade path is NOT clean if the package is built.
Also I changed a bit the approach of how the scripts are handled. Basically instead of copying and moving them around I created symbolic links that point to the unversioned binaries, for backwards compatibility.
Also added the LICENSE file as it was missing from the file list.