#2 Remove Python 2 subpackage, move scripts to Python 3 subpackage
Merged 4 years ago by zbyszek. Opened 4 years ago by lbalhar.
rpms/ lbalhar/python-igor master  into  master

file modified
+10 -37
@@ -4,7 +4,7 @@ 

  

  Name:           python-igor

  Version:        0.3

- Release:        8.%{gitdate}git%{shortcommit}%{?dist}

+ Release:        9.%{gitdate}git%{shortcommit}%{?dist}

  Summary:        Parser for Igor Binary Waves (.ibw) and Packed Experiment (.pxp) files

  

  # igor-0.2/igor/igorpy.py is PD, the restis LGPLv3+
@@ -15,11 +15,6 @@ 

  

  BuildArch:      noarch

  BuildRequires:  /usr/bin/rename

- BuildRequires:  python2-devel

- BuildRequires:  python2-numpy

- BuildRequires:  python2-matplotlib

- BuildRequires:  python2-nose

- 

  BuildRequires:  python3-devel

  BuildRequires:  python3-numpy

  BuildRequires:  python3-matplotlib
@@ -32,23 +27,11 @@ 

  Note that this package is unrelated to igor (Automated distribution

  life-cycle testing).

  

- %package -n python2-igor

- Summary:        %{summary}

- Requires:       python2-numpy

- Requires:       python2-matplotlib

- %{?python_provide:%python_provide python2-igor}

- 

- %description -n python2-igor

- Python parsers for Igor Binary Waves (.ibw) and Packed Experiment

- (.pxp) files written by WaveMetrics’ IGOR Pro software.

- 

- Note that this package is unrelated to igor (Automated distribution

- life-cycle testing).

- 

  %package -n python3-igor

  Summary:        %{summary}

  Requires:       python3-numpy

  Requires:       python3-matplotlib

+ Obsoletes:      python2-igor < 0.3-9

  %{?python_provide:%python_provide python3-igor}

  

  %description -n python3-igor
@@ -62,21 +45,15 @@ 

  %autosetup -n igor-%{version} -N

  

  %build

- %py2_build

  %py3_build

  

  %install

  %py3_install

- rm %{buildroot}%{_bindir}/igor*

- %py2_install

  

+ pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/*.py

  rename '.py' '' %{buildroot}%{_bindir}/*

  

  %check

- # Tests fail with new numpy due to minor formatting differences.

- # Ignore the result for now.

- nosetests-%{python2_version} --with-doctest --doctest-tests igor test -v || :

- 

  # Tests fail under python3, primarily because b'' prefixes are present

  # everywhere in output under python3. Upstream has rejected my initial

  # approach of just adding them everywhere in the examples, and indeed,
@@ -88,24 +65,20 @@ 

  %global _docdir_fmt %{name}

  

  # make sure that we got the python version right in the header

- head -n1 %{buildroot}%{_bindir}/igorbinarywave | grep %{__python2} -q

- head -n1 %{buildroot}%{_bindir}/igorpackedexperiment | grep %{__python2} -q

- 

- %files -n python2-igor

- %{python2_sitelib}/*

- %license COPYING.LESSER

- %doc README

- # Use python2 versions for now, python3 version has had much less testing.

- # At some point in the future, we should switch to python3.

- %{_bindir}/igorbinarywave

- %{_bindir}/igorpackedexperiment

+ head -n1 %{buildroot}%{_bindir}/igorbinarywave | grep %{__python3} -q

+ head -n1 %{buildroot}%{_bindir}/igorpackedexperiment | grep %{__python3} -q

  

  %files -n python3-igor

  %{python3_sitelib}/*

  %license COPYING.LESSER

  %doc README

+ %{_bindir}/igorbinarywave

+ %{_bindir}/igorpackedexperiment

  

  %changelog

+ * Thu Oct 17 2019 Lumír Balhar <lbalhar@redhat.com> - 0.3-9.20150408git2c2a79d

+ - Remove Python 2 subpackage, move scripts to Python 3 subpackage

+ 

  * Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.3-8.20150408git2c2a79d

  - Rebuilt for Python 3.8.0rc1 (#1748018)

  

Fixes rhbz#1738802

Update to python3-igor-0.3-9.20150408git2c2a79d also unistall python2-subpackage.

@churchyard could you please check it? I am not 100% sure about the Obsoletes.

1 new commit added

  • fixup! Remove Python 2 subpackage, move scripts to Python 3 subpackage
4 years ago

the = is useless (and can confuse people reading it)

note that 0.3-8.20150408git2c2a79d.fc32 > 0.3-8.20150408git2c2a79d

Use Obsoletes: python2-igor < 0.3-9 instead

may I suggest using pathfix.py instead?

This was a good check! keep it, but update if for python3 please.

rebased onto fe4f71d

4 years ago

Well, I don't see any additional value in changing shebang in the %install section and checking the shebang of the same files in %check section but I've addressed all your comments.

New scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=38345543

Pull-Request has been merged by zbyszek

4 years ago