Unverified Commit 377453c3 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #252076 from r-ryantm/auto-update/python310Packages.us

python310Packages.us: 2.0.2 -> 3.1.1
parents 31859592 139db136
Loading
Loading
Loading
Loading
+29 −12
Original line number Diff line number Diff line
@@ -2,35 +2,52 @@
, buildPythonPackage
, fetchPypi
, jellyfish
, pytestCheckHook
, pythonOlder
, pytz
}:

buildPythonPackage rec {
  pname = "us";
  version = "2.0.2";
  version = "3.1.1";
  format = "setuptools";

  propagatedBuildInputs = [ jellyfish ];
  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit pname version;
    sha256 = "cb11ad0d43deff3a1c3690c74f0c731cff5b862c73339df2edd91133e1496fbc";
    hash = "sha256-40eWPo0kocp0N69EP6aFkXdoR7UMhlDY7w61NILnBcI=";
  };

  # Upstream requires jellyfish==0.5.6 but we have 0.6.1
  postPatch = ''
    substituteInPlace setup.py --replace "jellyfish==" "jellyfish>="
    # Upstream spins jellyfish
    substituteInPlace setup.py \
      --replace "jellyfish==" "jellyfish>="
  '';

  doCheck = false; # pypi version doesn't include tests
  propagatedBuildInputs = [
    jellyfish
  ];

  meta = {
  nativeCheckInputs = [
    pytestCheckHook
    pytz
  ];

  pythonImportsCheck = [
    "us"
  ];

  meta = with lib; {
    description = "A package for easily working with US and state metadata";
    longDescription = ''
    all US states and territories, postal abbreviations, Associated Press style
      All US states and territories, postal abbreviations, Associated Press style
      abbreviations, FIPS codes, capitals, years of statehood, time zones, phonetic
      state name lookup, is contiguous or continental, URLs to shapefiles for state,
    census, congressional districts, counties, and census tracts
      census, congressional districts, counties, and census tracts.
    '';
    homepage = "https://github.com/unitedstates/python-us/";
    license = lib.licenses.bsd3;
    license = licenses.bsd3;
    maintainers = with maintainers; [ ];
  };
}