#1 Drop Python 2 subpackage + Update to 1.8a2 (to make it build and work with GDAL 2.3)
Merged 5 years ago by qulogic. Opened 5 years ago by churchyard.
rpms/ churchyard/python-fiona py2only  into  master

file modified
+1
@@ -1,3 +1,4 @@ 

  /Fiona-1.7.8.tar.gz

  /Fiona-1.7.10.tar.gz

  /Fiona-1.7.13.tar.gz

+ /Fiona-1.8a2.tar.gz

@@ -1,4 +1,4 @@ 

- From 563783077b5cde24d10cb7c55bba643007f3520f Mon Sep 17 00:00:00 2001

+ From 59aa512a6a8f923e430dec23c6ca76c3c43a4629 Mon Sep 17 00:00:00 2001

  From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

  Date: Wed, 18 Jul 2018 16:46:45 -0400

  Subject: [PATCH] TST: Fix flaky listing test.
@@ -6,54 +6,39 @@ 

  Since this reads layer names from multiple files, there's no guarantee

  that they will be in order since the filesystem can iterate in any

  order.

- 

- Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

  ---

-  tests/test_fio_ls.py  | 4 ++--

+  tests/test_fio_ls.py  | 2 +-

   tests/test_listing.py | 4 ++--

-  2 files changed, 4 insertions(+), 4 deletions(-)

+  2 files changed, 3 insertions(+), 3 deletions(-)

  

  diff --git a/tests/test_fio_ls.py b/tests/test_fio_ls.py

- index 14d614b..399193b 100644

+ index 86602e8..4663a68 100644

  --- a/tests/test_fio_ls.py

  +++ b/tests/test_fio_ls.py

- @@ -23,7 +23,7 @@ def test_fio_ls_single_layer():

-          'tests/data/'])

+ @@ -18,7 +18,7 @@ def test_fio_ls_single_layer():

+          DATA_DIR])

       assert result.exit_code == 0

       assert len(result.output.splitlines()) == 1

  -    assert json.loads(result.output) == ['coutwildrnp', 'gre']

  +    assert sorted(json.loads(result.output)) == ['coutwildrnp', 'gre']

   

   

-  @unittest.skipIf(FIXME_WINDOWS, 

- @@ -59,7 +59,7 @@ def test_fio_ls_multi_layer():

-          result = CliRunner().invoke(main_group, [

-              'ls', outdir])

-          assert result.exit_code == 0

- -        assert json.loads(result.output) == layer_names

- +        assert sorted(json.loads(result.output)) == layer_names

-  

-      finally:

-          shutil.rmtree(outdir)

+  def test_fio_ls_indent(path_coutwildrnp_shp):

  diff --git a/tests/test_listing.py b/tests/test_listing.py

- index c74e452..84b4064 100644

+ index 96344e4..18e4b4e 100644

  --- a/tests/test_listing.py

  +++ b/tests/test_listing.py

- @@ -19,12 +19,12 @@ def test_single_file():

-      assert fiona.listlayers('tests/data/coutwildrnp.shp') == ['coutwildrnp']

-  

-  def test_directory():

- -    assert fiona.listlayers('tests/data') == ['coutwildrnp', 'gre']

- +    assert sorted(fiona.listlayers('tests/data')) == ['coutwildrnp', 'gre']

-  

-  @unittest.skipIf(FIXME_WINDOWS,

-                   reason="FIXME on Windows. ValueError raised. Please look into why this test isn't working.")

-  def test_directory_trailing_slash():

- -    assert fiona.listlayers('tests/data/') == ['coutwildrnp', 'gre']

- +    assert sorted(fiona.listlayers('tests/data/')) == ['coutwildrnp', 'gre']

-  

-  def test_zip_path():

-      assert fiona.listlayers('zip://tests/data/coutwildrnp.zip') == ['coutwildrnp']

- -- 

- 2.17.1

- 

+ @@ -24,11 +24,11 @@ def test_single_file(path_coutwildrnp_shp):

+  

+  

+  def test_directory(data_dir):

+ -    assert fiona.listlayers(data_dir) == ['coutwildrnp', 'gre']

+ +    assert sorted(fiona.listlayers(data_dir)) == ['coutwildrnp', 'gre']

+  

+  

+  def test_directory_trailing_slash(data_dir):

+ -    assert fiona.listlayers(data_dir) == ['coutwildrnp', 'gre']

+ +    assert sorted(fiona.listlayers(data_dir)) == ['coutwildrnp', 'gre']

+  

+  

+  def test_zip_path(path_coutwildrnp_zip):

file modified
+23 -71
@@ -2,13 +2,15 @@ 

  %global Srcname Fiona

  

  Name:           python-%{srcname}

- Version:        1.7.13

- Release:        1%{?dist}

+ Version:        1.8

+ %global         pre a2

+ %global         uversion %{version}%{?pre}

+ Release:        0.2.%{pre}%{?dist}

  Summary:        Fiona reads and writes spatial data files

  

  License:        BSD

  URL:            https://pypi.python.org/pypi/%{srcname}

- Source0:        https://github.com/Toblerity/%{Srcname}/archive/%{version}/%{Srcname}-%{version}.tar.gz

+ Source0:        https://github.com/Toblerity/%{Srcname}/archive/%{uversion}/%{Srcname}-%{uversion}.tar.gz

  # https://github.com/Toblerity/Fiona/pull/610

  Patch0001:      0001-TST-Fix-flaky-listing-test.patch

  
@@ -16,55 +18,9 @@ 

  BuildRequires:  gdal >= 1.8

  BuildRequires:  gdal-devel >= 1.8

  

- %description

- Fiona is designed to be simple and dependable. It focuses on reading and

- writing data in standard Python IO style and relies upon familiar Python types

- and protocols such as files, dictionaries, mappings, and iterators instead of

- classes specific to OGR. Fiona can read and write real-world data using

- multi-layered GIS formats and zipped virtual file systems and integrates

- readily with other Python GIS packages such as pyproj, Rtree, and Shapely.

- 

+ %{?python_enable_dependency_generator}

  

- %package -n python2-%{srcname}

- Summary:        %{summary}

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

- 

- BuildRequires:  python2-devel

- BuildRequires:  python2-Cython

- BuildRequires:  python2-six >= 1.7

- %if %{fedora} > 27

- BuildRequires:  python2-munch

- %else

- BuildRequires:  python-munch

- %endif

- BuildRequires:  python2-cligj >= 0.4

- BuildRequires:  python2-click-plugins

- %if %{fedora} > 27

- BuildRequires:  python2-shapely

- %else

- BuildRequires:  python-shapely

- %endif

- BuildRequires:  python2-enum34

- 

- BuildRequires:  python2-nose

- BuildRequires:  python2-pytest

- 

- Requires:       python2-six >= 1.7

- %if %{fedora} > 27

- Requires:       python2-munch

- %else

- Requires:       python-munch

- %endif

- Requires:       python2-cligj >= 0.4

- Requires:       python2-click-plugins

- %if %{fedora} > 27

- Requires:       python2-shapely

- %else

- Requires:       python-shapely

- %endif

- Requires:       python2-enum34

- 

- %description -n python2-%{srcname}

+ %description

  Fiona is designed to be simple and dependable. It focuses on reading and

  writing data in standard Python IO style and relies upon familiar Python types

  and protocols such as files, dictionaries, mappings, and iterators instead of
@@ -78,21 +34,20 @@ 

  %{?python_provide:%python_provide python3-%{srcname}}

  

  BuildRequires:  python3-devel

+ BuildRequires:  python3-setuptools

  BuildRequires:  python3-Cython

+ BuildRequires:  python3-boto3

  BuildRequires:  python3-six >= 1.7

  BuildRequires:  python3-munch

  BuildRequires:  python3-cligj >= 0.4

  BuildRequires:  python3-click-plugins

  BuildRequires:  python3-shapely

  

- BuildRequires:  python3-nose

+ BuildRequires:  python3-packaging

  BuildRequires:  python3-pytest

  

- Requires:       python3-six >= 1.7

- Requires:       python3-munch

- Requires:       python3-cligj >= 0.4

- Requires:       python3-click-plugins

- Requires:       python3-shapely

+ Recommends:     python3-boto3

+ Recommends:     python3-shapely

  

  %description -n python3-%{srcname}

  Fiona is designed to be simple and dependable. It focuses on reading and
@@ -104,16 +59,14 @@ 

  

  

  %prep

- %autosetup -n %{Srcname}-%{version} -p1

+ %autosetup -n %{Srcname}-%{uversion} -p1

  

  

  %build

- %py2_build

  %py3_build

  

  

  %install

- %py2_install

  %py3_install

  

  
@@ -124,28 +77,27 @@ 

  pushd temp

  ln -s ../tests

  PYTHONPATH="%{buildroot}%{python3_sitearch}" \

-     nosetests-%{python3_version} --exclude test_filter_vsi --exclude test_geopackage --exclude test_write_mismatch

- PYTHONPATH="%{buildroot}%{python2_sitearch}" \

-     nosetests --exclude test_filter_vsi --exclude test_geopackage --exclude test_write_mismatch

+     %{__python3} -m pytest -m "not network"

  popd

  

  

- %files -n python2-%{srcname}

- %license LICENSE.txt

- %doc README.rst CHANGES.txt CREDITS.txt

- %{python2_sitearch}/%{srcname}

- %{python2_sitearch}/%{Srcname}-%{version}-py%{python2_version}.egg-info

- 

- 

  %files -n python3-%{srcname}

  %license LICENSE.txt

  %doc README.rst CHANGES.txt CREDITS.txt

  %{_bindir}/fio

  %{python3_sitearch}/%{srcname}

- %{python3_sitearch}/%{Srcname}-%{version}-py%{python3_version}.egg-info

+ %{python3_sitearch}/%{Srcname}-%{uversion}-py%{python3_version}.egg-info

  

  

  %changelog

+ * Sat Sep 22 2018 Miro Hrončok <mhroncok@redhat.com> - 1.8-0.2.a2

+ - Drop Python 2 subpackage

+ 

+ * Fri Sep 21 2018 Miro Hrončok <mhroncok@redhat.com> - 1.8-0.1.a2

+ - Update to 1.8a2

+ - Use automatic Python dependency generator

+ - Use pytest instead of nose

+ 

  * Wed Jul 18 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.7.13-1

  - Update to latest version

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (Fiona-1.7.13.tar.gz) = a55a4c656767d5e7d081ba9bfa2d5eca0ade29ba19dae85c89f2b4077adff92ccb0bd00a63ac573141f391f44f2e6bc995060d68d171de98568083fbb6dd52aa

+ SHA512 (Fiona-1.8a2.tar.gz) = d098c9fc217992998b4b2c85248a96faf3f9588a182ca9c257b57ec8dac014788fe2b14d0116ae7aabb403c0c6fdf0cf28b96aedc861bf0496043d22c9cbaf0c

no initial comment

I might need to switch to the next alpha for this one. Current release does not support GDAL 2.3.

I've got plenty of errors even with 1.8a2.

AttributeError: 'Collection' object has no attribute 'session'

Probably need to switch to pytest as well.

that leaves only 4 failed and all seem internet related https://koji.fedoraproject.org/koji/taskinfo?taskID=29800733

will deselect those and also will check if the ones previously excluded work

Also assert ['gre', 'coutwildrnp'] == ['coutwildrnp', 'gre'] that is https://github.com/Toblerity/Fiona/pull/610 (I removed that as it was merged, but will readd, as it is not in 1.8a2)

1 new commit added

  • Update to 1.8a2
5 years ago

It builds fine now. Thanks for the pytest hint.

Should I reorder the commits so we can take the update into F29 where is GDAL 2.3 as well?

rebased onto 0477da7

5 years ago

Pull-Request has been merged by qulogic

5 years ago