Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 987a5ffea575
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0e4457ce939c
Choose a head ref
  • 10 commits
  • 11 files changed
  • 2 contributors

Commits on Jan 6, 2020

  1. pythonPackages.area: init at 1.1.1

    kalbasit authored and Jon committed Jan 6, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    jonringer Jonathan Ringer
    Copy the full SHA
    98e4b05 View commit details
  2. pythonPackages.oscrypto: init at 1.1.1

    kalbasit authored and Jon committed Jan 6, 2020
    Copy the full SHA
    8328840 View commit details
  3. Copy the full SHA
    892f296 View commit details
  4. pythonPackages.snowflake-sqlalchemy: init at 1.1.17

    kalbasit authored and Jon committed Jan 6, 2020
    Copy the full SHA
    801b343 View commit details
  5. pythonPackages.timezonefinder: init at 4.2.0

    kalbasit authored and Jon committed Jan 6, 2020
    Copy the full SHA
    be2b7fd View commit details
  6. h3: init at 3.4.4

    kalbasit authored and Jon committed Jan 6, 2020
    Copy the full SHA
    1301359 View commit details
  7. h3: fix darwin build

    Disable linting as it uses clang-tidy, which isn't a cc-wrapper and
    won't find our dependencies automatically.
    LnL7 authored and Jon committed Jan 6, 2020
    Copy the full SHA
    9d9bba1 View commit details
  8. pythonPackages.h3: init at 3.4.3

    kalbasit authored and Jon committed Jan 6, 2020
    Copy the full SHA
    ba3aeb1 View commit details
  9. h3: 3.4.4 -> 3.6.2

    kalbasit authored and Jon committed Jan 6, 2020
    Copy the full SHA
    e08c77a View commit details
  10. pythonPackages.timezonefinder: disable on Python 2

    kalbasit authored and Jon committed Jan 6, 2020
    Copy the full SHA
    0e4457c View commit details
30 changes: 30 additions & 0 deletions pkgs/development/misc/h3/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{ stdenv
, cmake
, fetchFromGitHub
}:

stdenv.mkDerivation rec {
pname = "h3";
version = "3.6.2";

src = fetchFromGitHub {
owner = "uber";
repo = "h3";
rev = "v${version}";
sha256 = "0mlv3jk0j340l0bhr3brxm3hbdcfmyp86h7d85537c81cl64y7kg";
};

nativeBuildInputs = [ cmake ];

cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
"-DENABLE_LINTING=OFF"
];

meta = with stdenv.lib; {
homepage = "https://github.com/uber/h3";
description = "Hexagonal hierarchical geospatial indexing system";
license = licenses.asl20;
maintainers = [ maintainers.kalbasit ];
};
}
20 changes: 20 additions & 0 deletions pkgs/development/python-modules/area/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{ lib, buildPythonPackage, fetchPypi }:

buildPythonPackage rec {
pname = "area";
version = "1.1.1";

src = fetchPypi {
inherit pname version;
sha256 = "18k5hwmlxhajlq306zxndsglb11vv8vd4vpmwx8dpvfxd1kbksya";
};

# tests not working on the package from pypi
doCheck = false;

meta = with lib; {
description = "Calculate the area inside of any GeoJSON geometry. This is a port of Mapbox’s geojson-area for Python.";
homepage = "https://github.com/scisco/area";
license = licenses.bsd2;
};
}
35 changes: 35 additions & 0 deletions pkgs/development/python-modules/h3/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{ stdenv
, buildPythonPackage
, cmake
, fetchPypi
, h3
, python
}:

buildPythonPackage rec {
pname = "h3";
version = "3.4.3";

src = fetchPypi {
inherit pname version;
sha256 = "07dlqpr1r4kzb3gci395plpss8gxvvrij40l6w0mylyg7fkab4m2";
};

patches = [
./disable-custom-install.patch
./hardcode-h3-path.patch
];

preBuild = ''
substituteInPlace h3/h3.py \
--subst-var-by libh3_path ${h3}/lib/libh3${stdenv.hostPlatform.extensions.sharedLibrary}
'';

meta = with stdenv.lib; {
homepage = "https://github.com/uber/h3-py";
description = "This library provides Python bindings for the H3 Core Library.";
license = licenses.asl20;
platforms = platforms.unix ++ platforms.darwin;
maintainers = [ maintainers.kalbasit ];
};
}
41 changes: 41 additions & 0 deletions pkgs/development/python-modules/h3/disable-custom-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
diff --git a/setup.py b/setup.py
index 8e1c220..45297b6 100644
--- a/setup.py
+++ b/setup.py
@@ -25,20 +25,6 @@ class CustomBuildExtCommand(build_ext):
install_h3(h3_version)


-# Tested with wheel v0.29.0
-class BinaryDistribution(Distribution):
- def __init__(self, attrs=None):
- Distribution.__init__(self, attrs)
- # The values used for the name and sources in the Extension below are
- # not important, because we override the build_ext command above.
- # The normal C extension building logic is never invoked, and is
- # replaced with our own custom logic. However, ext_modules cannot be
- # empty, because this signals to other parts of distutils that our
- # package contains C extensions and thus needs to be built for
- # different platforms separately.
- self.ext_modules = [Extension('h3c', [])]
-
-
long_description = open('README.rst').read()

setup(
@@ -52,14 +38,10 @@ setup(
url='https://github.com/uber/h3-py.git',
packages=find_packages(exclude=['tests', 'tests.*']),
install_requires=[],
- cmdclass={
- 'build_ext': CustomBuildExtCommand,
- },
package_data={
'h-py':
['out/*.dylib' if platform.system() == 'Darwin' else (
'out/*.dll' if platform.system() == 'Windows' else
'out/*.so.*')]
},
- license='Apache License 2.0',
- distclass=BinaryDistribution)
+ license='Apache License 2.0')
19 changes: 19 additions & 0 deletions pkgs/development/python-modules/h3/hardcode-h3-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/h3/h3.py b/h3/h3.py
index 18cf168..2cc7812 100644
--- a/h3/h3.py
+++ b/h3/h3.py
@@ -34,13 +34,7 @@ from ctypes import (
POINTER,
)

-_dirname = os.path.dirname(__file__)
-libh3_path = ('{}/{}'.format(_dirname, 'out/libh3.1.dylib')
- if platform.system() == 'Darwin' else (
- '{}/{}'.format(_dirname, 'out/h3.dll') if platform.system() == 'Windows' else
- '{}/{}'.format(_dirname, 'out/libh3.so.1')))
-
-libh3 = cdll.LoadLibrary(libh3_path)
+libh3 = cdll.LoadLibrary('@libh3_path@')

# Type of an H3 index
H3Index = c_ulonglong
41 changes: 41 additions & 0 deletions pkgs/development/python-modules/oscrypto/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{ buildPythonPackage
, asn1crypto
, fetchPypi
, lib
, openssl
}:

buildPythonPackage rec {
pname = "oscrypto";
version = "1.1.1";

src = fetchPypi {
inherit pname version;
sha256 = "1vlryamwr442w2av8f54ldhls8fqs6678fg60pqbrf5pjy74kg23";
};

testSources = fetchPypi {
inherit version;
pname = "oscrypto_tests";
sha256 = "1crndz647pqdd8148yn3n5l63xwr6qkwa1qarsz59nk3ip0dsyq5";
};

preCheck = ''
tar -xf ${testSources}
mv oscrypto_tests-${version} tests
# remove tests that require network
sed -e '/TLSTests/d' -e '/TrustListTests/d' -i tests/__init__.py
'';

propagatedBuildInputs = [
asn1crypto
openssl
];

meta = with lib; {
description = "A compilation-free, always up-to-date encryption library for Python that works on Windows, OS X, Linux and BSD.";
homepage = "https://www.snowflake.com/";
license = licenses.mit;
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{ buildPythonPackage
, asn1crypto
, azure-storage-blob
, boto3
, certifi
, cffi
, fetchPypi
, future
, idna
, ijson
, isPy3k
, lib
, oscrypto
, pyarrow
, pyasn1-modules
, pycryptodomex
, pyjwt
, pyopenssl
, pytz
, requests
, six
, urllib3
}:

buildPythonPackage rec {
pname = "snowflake-connector-python";
version = "2.1.2";

src = fetchPypi {
inherit pname version;
sha256 = "06061d59lapqrlg3gzdk4bi3v9c3q5zxfs0if5v2chg1f2l80ncr";
};

propagatedBuildInputs = [
azure-storage-blob
asn1crypto
boto3
certifi
cffi
future
idna
ijson
oscrypto
pycryptodomex
pyjwt
pyopenssl
pytz
requests
six
] ++ lib.optionals (!isPy3k) [
pyarrow
pyasn1-modules
urllib3
];

# tests are not working
# XXX: fix the tests
doCheck = false;

meta = with lib; {
description = "Snowflake Connector for Python";
homepage = "https://www.snowflake.com/";
license = licenses.asl20;
};
}
27 changes: 27 additions & 0 deletions pkgs/development/python-modules/snowflake-sqlalchemy/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{ buildPythonPackage
, lib
, fetchPypi
, sqlalchemy
, snowflake-connector-python
}:

buildPythonPackage rec {
pname = "snowflake-sqlalchemy";
version = "1.1.17";

src = fetchPypi {
inherit pname version;
sha256 = "1pmmwkw29944zh044azwbc1gf4s04fm55920d9if2a3zpjm6c5d7";
};

propagatedBuildInputs = [
sqlalchemy
snowflake-connector-python
];

meta = with lib; {
description = "Snowflake SQLAlchemy Dialect";
homepage = "https://www.snowflake.net/";
license = licenses.asl20;
};
}
31 changes: 31 additions & 0 deletions pkgs/development/python-modules/timezonefinder/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{ buildPythonPackage
, lib
, fetchPypi
, isPy27
, numba
, numpy
}:

buildPythonPackage rec {
pname = "timezonefinder";
version = "4.2.0";

disabled = isPy27;

src = fetchPypi {
inherit pname version;
sha256 = "0q8nd279labn03dz17s4xrglk1d31q9y8wcx99l51i5cxx53zsap";
};

propagatedBuildInputs = [
numpy
];

checkInputs = [ numba ];

meta = with lib; {
description = "fast python package for finding the timezone of any point on earth (coordinates) offline";
homepage = "https://github.com/MrMinimal64/timezonefinder";
license = licenses.mit;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -9470,6 +9470,8 @@ in
samples = true;
};

h3 = callPackage ../development/misc/h3 { };

amtk = callPackage ../development/libraries/amtk { };

avrlibc = callPackage ../development/misc/avr/libc {};
12 changes: 12 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
@@ -717,6 +717,8 @@ in {

gumath = callPackage ../development/python-modules/gumath { };

h3 = callPackage ../development/python-modules/h3 { inherit (pkgs) h3; };

h5py = callPackage ../development/python-modules/h5py {
hdf5 = pkgs.hdf5;
};
@@ -1596,6 +1598,8 @@ in {

argcomplete = callPackage ../development/python-modules/argcomplete { };

area = callPackage ../development/python-modules/area { };

arxiv2bib = callPackage ../development/python-modules/arxiv2bib { };

chai = callPackage ../development/python-modules/chai { };
@@ -2862,6 +2866,8 @@ in {

oset = callPackage ../development/python-modules/oset { };

oscrypto = callPackage ../development/python-modules/oscrypto { };

oyaml = callPackage ../development/python-modules/oyaml { };

pamela = callPackage ../development/python-modules/pamela { };
@@ -5307,6 +5313,10 @@ in {

slimit = callPackage ../development/python-modules/slimit { };

snowflake-connector-python = callPackage ../development/python-modules/snowflake-connector-python { };

snowflake-sqlalchemy = callPackage ../development/python-modules/snowflake-sqlalchemy { };

snowballstemmer = callPackage ../development/python-modules/snowballstemmer { };

snitun = callPackage ../development/python-modules/snitun { };
@@ -5441,6 +5451,8 @@ in {
inherit (pkgs) tiledb;
};

timezonefinder = callPackage ../development/python-modules/timezonefinder { };

tiros = callPackage ../development/python-modules/tiros { };

tinydb = callPackage ../development/python-modules/tinydb { };