summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFrederik Rietdijk <freddyrietdijk@fridh.nl>2017-12-12 20:59:14 +0100
committerGitHub <noreply@github.com>2017-12-12 20:59:14 +0100
commitde3105883a86f05ed5c3b15b2375f3a11d11dab2 (patch)
tree3fdb2212d3271d098088d48d731d77f01e34876c /pkgs
parent1817ec70fd0ff26c898dcb2c64f4c83b1b265515 (diff)
parentba19c2d18e250ed3b94f411841a6affbf08bf89b (diff)
downloadnixlib-de3105883a86f05ed5c3b15b2375f3a11d11dab2.tar
nixlib-de3105883a86f05ed5c3b15b2375f3a11d11dab2.tar.gz
nixlib-de3105883a86f05ed5c3b15b2375f3a11d11dab2.tar.bz2
nixlib-de3105883a86f05ed5c3b15b2375f3a11d11dab2.tar.lz
nixlib-de3105883a86f05ed5c3b15b2375f3a11d11dab2.tar.xz
nixlib-de3105883a86f05ed5c3b15b2375f3a11d11dab2.tar.zst
nixlib-de3105883a86f05ed5c3b15b2375f3a11d11dab2.zip
Merge pull request #32591 from makefu/pkgs/dateparser/update
 pythonPackages.dateparser: 0.3.2-pre-2016-01-21 -> 0.6.0 
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/dateparser/default.nix43
-rw-r--r--pkgs/top-level/python-packages.nix34
2 files changed, 46 insertions, 31 deletions
diff --git a/pkgs/development/python-modules/dateparser/default.nix b/pkgs/development/python-modules/dateparser/default.nix
new file mode 100644
index 000000000000..b73a1e9ec7fc
--- /dev/null
+++ b/pkgs/development/python-modules/dateparser/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchFromGitHub, buildPythonPackage, isPy3k
+, nose
+, nose-parameterized
+, mock
+, glibcLocales
+, six
+, jdatetime
+, pyyaml
+, dateutil
+, umalqurra
+, pytz
+, tzlocal
+, regex
+, ruamel_yaml }:
+buildPythonPackage rec {
+  pname = "dateparser";
+  version = "0.6.0";
+
+  src = fetchFromGitHub {
+    owner = "scrapinghub";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    sha256 = "0q2vyzvlj46r6pr0s6m1a0md1cpg9nv1n3xw286l4x2cc7fj2g3y";
+  };
+
+  # Upstream Issue: https://github.com/scrapinghub/dateparser/issues/364
+  disabled = isPy3k;
+
+  checkInputs = [ nose nose-parameterized mock glibcLocales ];
+  preCheck =''
+    # skip because of missing convertdate module, which is an extra requirement
+    rm tests/test_jalali.py
+  '';
+
+  propagatedBuildInputs = [ six jdatetime pyyaml dateutil
+            umalqurra pytz tzlocal regex ruamel_yaml ];
+
+  meta = with stdenv.lib;{
+    description = "Date parsing library designed to parse dates from HTML pages";
+    homepage = https://github.com/scrapinghub/dateparser;
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 3bacb8c45a41..2e1a2db61b74 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -4351,33 +4351,7 @@ in {
 
   daphne = callPackage ../development/python-modules/daphne { };
 
-  dateparser = buildPythonPackage rec {
-    name = "dateparser-${version}";
-    version = "0.3.2-pre-2016-01-21"; # Fix assert year 2016 == 2015
-
-    src = pkgs.fetchgit {
-      url = "https://github.com/scrapinghub/dateparser.git";
-      rev = "d20a63f1d1cee5b4bd19c9f745774cfa9f219549";
-      sha256 = "0na7b4hvf7vykrk48482gxiq5xny67rvs8ilamxcxw3y9gfgdjfd";
-    };
-
-    # Does not seem to work on Python 3 because of relative import.
-    # Upstream Travis configuration is wrong and tests only 2.7
-    disabled = isPy3k;
-
-    LC_ALL = "en_US.UTF-8";
-
-    buildInputs = with self; [ nose nose-parameterized mock pkgs.glibcLocales ];
-
-    propagatedBuildInputs = with self; [ six jdatetime pyyaml dateutil umalqurra pytz ];
-
-    meta = {
-      description = "Date parsing library designed to parse dates from HTML pages";
-      homepage = https://pypi.python.org/pypi/dateparser;
-      license = licenses.bsd3;
-      broken = true;
-    };
-  };
+  dateparser = callPackage ../development/python-modules/dateparser { };
 
   # Actual name of package
   python-dateutil = callPackage ../development/python-modules/dateutil { };
@@ -17524,9 +17498,6 @@ in {
     name = "ruamel.yaml-${version}";
     version = "0.13.7";
 
-    # needs ruamel_ordereddict for python2 support
-    disabled = !isPy3k;
-
     src = pkgs.fetchurl {
       url = "mirror://pypi/r/ruamel.yaml/${name}.tar.gz";
       sha256 = "1vca2552k0kmhr9msg1bbfdvp3p9im17x1a6npaw221vlgg15z7h";
@@ -17535,7 +17506,8 @@ in {
     # Tests cannot load the module to test
     doCheck = false;
 
-    propagatedBuildInputs = with self; [ ruamel_base typing ];
+    propagatedBuildInputs = with self; [ ruamel_base typing ] ++
+    (optional (!isPy3k) self.ruamel_ordereddict);
 
     meta = {
       description = "YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order";