Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geojson: init at 2.3.0 #40762

Merged
merged 1 commit into from May 19, 2018
Merged

geojson: init at 2.3.0 #40762

merged 1 commit into from May 19, 2018

Conversation

oxzi
Copy link
Member

@oxzi oxzi commented May 19, 2018

Motivation for this change

Adds the geojson Python-module to nixpkgs

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

buildPythonPackage rec {
pname = "geojson";
version = "2.3.0";
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name attribute is added by buildPython* and should therefore be removed.

sha256 = "06ihcb8839zzgk5jcv18kc6nqld4hhj3nk4f3drzcr8n8893v1y8";
};

# test_unicode_properties fails for Python 3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you post the full error.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you are:

======================================================================
ERROR: test_unicode_properties (test_features.FeaturesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/geojson-2.3.0/tests/test_features.py", line 41, in test_unicode_properties
    obj = geojson.load(file_)
  File "/build/geojson-2.3.0/geojson/codec.py", line 43, in load
    **kwargs)
  File "/nix/store/96wn2gz3mwi71gwcrvpfg39bsymd7gqx-python3-3.6.5/lib/python3.6/json/__init__.py", line 296, in load
    return loads(fp.read(),
  File "/nix/store/96wn2gz3mwi71gwcrvpfg39bsymd7gqx-python3-3.6.5/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

----------------------------------------------------------------------

Copy link
Member

@FRidh FRidh May 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a common issue described in the Nixpkgs manual:

Unicode issues can typically be fixed by including glibcLocales in buildInputs checkInputs and exporting LC_ALL=en_US.utf-8.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't knew about this one. Thanks for your help!

@oxzi oxzi force-pushed the python-geojson-2.3.0 branch 3 times, most recently from 95251f2 to 8cc805c Compare May 19, 2018 10:11
@FRidh
Copy link
Member

FRidh commented May 19, 2018

@GrahamcOfBorg build python.pkgs.geojson python3.pkgs.geojson

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python.pkgs.geojson, python3.pkgs.geojson

Partial log (click to expand)

test_valid_point_with_elevation (test_validation.TestValidationPoint) ... ok
test_invalid_polygon (test_validation.TestValidationPolygon) ... ok
test_valid_polygon (test_validation.TestValidationPolygon) ... ok
/private/tmp/nix-build-python3.6-geojson-2.3.0.drv-0/geojson-2.3.0/README.rst
Doctest: README.rst ... ok

----------------------------------------------------------------------
Ran 58 tests in 0.011s

OK

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python.pkgs.geojson, python3.pkgs.geojson

Partial log (click to expand)

test_encode_nested (test_geo_interface.EncodingDecodingTest) ... ok
test_invalid (test_geo_interface.EncodingDecodingTest) ... ok
test_mapping (test_geo_interface.EncodingDecodingTest) ... ok
/build/geojson-2.3.0/README.rst
Doctest: README.rst ... ok

----------------------------------------------------------------------
Ran 58 tests in 0.008s

OK

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python.pkgs.geojson, python3.pkgs.geojson

Partial log (click to expand)

test_valid_polygon (test_validation.TestValidationPolygon) ... ok
/build/geojson-2.3.0/README.rst
Doctest: README.rst ... ok

/nix/store/fjdshnrsvnis2hfkgin66xlmijsc1k6k-python2.7-geojson-2.3.0
/nix/store/9h1x84psnmj89ai4pqjkrzkp02rq8kms-python3.6-geojson-2.3.0
----------------------------------------------------------------------
Ran 58 tests in 0.057s

OK

@FRidh FRidh merged commit c757111 into NixOS:master May 19, 2018
@oxzi oxzi deleted the python-geojson-2.3.0 branch May 19, 2018 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants