diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules')
52 files changed, 1326 insertions, 142 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/authheaders/default.nix b/nixpkgs/pkgs/development/python-modules/authheaders/default.nix index 09ed34ed9151..fdb478bc143b 100644 --- a/nixpkgs/pkgs/development/python-modules/authheaders/default.nix +++ b/nixpkgs/pkgs/development/python-modules/authheaders/default.nix @@ -1,4 +1,6 @@ -{ buildPythonPackage, fetchPypi, lib, authres, dnspython, dkimpy, publicsuffix }: +{ buildPythonPackage, fetchPypi, isPy27, lib +, authres, dnspython, dkimpy, ipaddress, publicsuffix +}: buildPythonPackage rec { pname = "authheaders"; @@ -9,7 +11,8 @@ buildPythonPackage rec { sha256 = "0hf1p6ws3jma608pmcb5qsl58xg33wz2s51qqzi9zix0llcnyc97"; }; - propagatedBuildInputs = [ authres dnspython dkimpy publicsuffix ]; + propagatedBuildInputs = [ authres dnspython dkimpy publicsuffix ] + ++ lib.optional isPy27 ipaddress; meta = { description = "Python library for the generation of email authentication headers"; diff --git a/nixpkgs/pkgs/development/python-modules/avro-python3/default.nix b/nixpkgs/pkgs/development/python-modules/avro-python3/default.nix new file mode 100644 index 000000000000..46272a5418d1 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/avro-python3/default.nix @@ -0,0 +1,22 @@ +{ lib, stdenv, buildPythonPackage, fetchPypi, isPy3k }: + +buildPythonPackage rec { + pname = "avro-python3"; + version = "1.9.1"; + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "daab2cea71b942a1eb57d700d4a729e9d6cd93284d4dd4d65a378b9f958aa0d2"; + }; + + doCheck = false; # No such file or directory: './run_tests.py + + meta = with lib; { + description = "A serialization and RPC framework"; + homepage = https://pypi.python.org/pypi/avro-python3/; + license = licenses.asl20; + + maintainers = [ maintainers.shlevy maintainers.timma ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/binwalk/default.nix b/nixpkgs/pkgs/development/python-modules/binwalk/default.nix index ec613527e92b..97c6b957a437 100644 --- a/nixpkgs/pkgs/development/python-modules/binwalk/default.nix +++ b/nixpkgs/pkgs/development/python-modules/binwalk/default.nix @@ -10,24 +10,39 @@ , p7zip , cabextract , lzma +, nose , pycrypto , pyqtgraph ? null }: -let visualizationSupport = (pyqtgraph != null); +let + visualizationSupport = (pyqtgraph != null); + version = "2.2.0"; in buildPythonPackage { pname = "binwalk"; - version = "2.1.1"; + inherit version; src = fetchFromGitHub { owner = "devttys0"; repo = "binwalk"; - rev = "291a03595d17f848c73b74cb6ca508da782cd8f7"; - sha256 = "0grid93yz6i6jb2zggrqncp5awdf7qi88j5y2k7dq0k9r6b8zydw"; + rev = "be738a52e09b0da2a6e21470e0dbcd5beb42ed1b"; + sha256 = "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"; }; propagatedBuildInputs = [ zlib xz ncompress gzip bzip2 gnutar p7zip cabextract lzma pycrypto ] - ++ stdenv.lib.optional visualizationSupport pyqtgraph; + ++ stdenv.lib.optional visualizationSupport pyqtgraph; + + # setup.py only installs version.py during install, not test + postPatch = '' + echo '__version__ = "${version}"' > src/binwalk/core/version.py + ''; + + # binwalk wants to access ~/.config/binwalk/magic + preCheck = '' + HOME=$(mktemp -d) + ''; + + checkInputs = [ nose ]; meta = with stdenv.lib; { homepage = "https://github.com/ReFirmLabs/binwalk"; diff --git a/nixpkgs/pkgs/development/python-modules/coreapi/default.nix b/nixpkgs/pkgs/development/python-modules/coreapi/default.nix new file mode 100644 index 000000000000..216d1ee69850 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/coreapi/default.nix @@ -0,0 +1,44 @@ +{ + stdenv, + fetchFromGitHub, + buildPythonPackage, + django, + coreschema, + itypes, + uritemplate, + requests, + pytest, +}: + +buildPythonPackage rec { + pname = "coreapi"; + version = "2.3.3"; + + src = fetchFromGitHub { + repo = "python-client"; + owner = "core-api"; + rev = version; + sha256 = "1c6chm3q3hyn8fmjv23qgc79ai1kr3xvrrkp4clbqkssn10k7mcw"; + }; + + propagatedBuildInputs = [ + django + coreschema + itypes + uritemplate + requests + ]; + + checkInputs = [ pytest ]; + checkPhase = '' + cd ./tests + pytest + ''; + + meta = with stdenv.lib; { + description = "Python client library for Core API"; + homepage = https://github.com/core-api/python-client; + license = licenses.bsd3; + maintainers = with maintainers; [ ivegotasthma ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/coreschema/default.nix b/nixpkgs/pkgs/development/python-modules/coreschema/default.nix new file mode 100644 index 000000000000..949fa31df958 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/coreschema/default.nix @@ -0,0 +1,34 @@ +{ + stdenv, + fetchFromGitHub, + buildPythonPackage, + jinja2, + pytest, +}: + +buildPythonPackage rec { + pname = "coreschema"; + version = "0.0.4"; + + src = fetchFromGitHub { + repo = "python-coreschema"; + owner = "core-api"; + rev = version; + sha256 = "027pc753mkgbb3r1v1x7dsdaarq93drx0f79ppvw9pfkcjcq6wb1"; + }; + + propagatedBuildInputs = [ jinja2 ]; + + checkInputs = [ pytest ]; + checkPhase = '' + cd ./tests + pytest + ''; + + meta = with stdenv.lib; { + description = "Python client library for Core Schema"; + homepage = https://github.com/ivegotasthma/python-coreschema; + license = licenses.bsd3; + maintainers = with maintainers; [ ivegotasthma ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/dash-core-components/default.nix b/nixpkgs/pkgs/development/python-modules/dash-core-components/default.nix new file mode 100644 index 000000000000..dfcbb9b6404a --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/dash-core-components/default.nix @@ -0,0 +1,24 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "dash_core_components"; + version = "1.7.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "16jjanq4glj6c2cwyw94954hrqqv49fknisbxj03lfmflg61j32k"; + }; + + # No tests in archive + doCheck = false; + + meta = with lib; { + description = "A dash component starter pack"; + homepage = https://dash.plot.ly/dash-core-components; + license = licenses.mit; + maintainers = [ maintainers.antoinerg ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/dash-html-components/default.nix b/nixpkgs/pkgs/development/python-modules/dash-html-components/default.nix new file mode 100644 index 000000000000..4e9ef39b411b --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/dash-html-components/default.nix @@ -0,0 +1,24 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "dash_html_components"; + version = "1.0.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "166agkrl52j5qin2npsdl2a96jccxz5f1jvcz0hxsnjg0ix0k4l9"; + }; + + # No tests in archive + doCheck = false; + + meta = with lib; { + description = "HTML components for Dash"; + homepage = https://dash.plot.ly/dash-html-components; + license = licenses.mit; + maintainers = [ maintainers.antoinerg ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/dash-renderer/default.nix b/nixpkgs/pkgs/development/python-modules/dash-renderer/default.nix new file mode 100644 index 000000000000..97942a13043b --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/dash-renderer/default.nix @@ -0,0 +1,24 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "dash_renderer"; + version = "1.2.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "1ccsykv24dz9xj24106aaj7f0w7x7sv7mamjbx0m6k0wyhh58vw1"; + }; + + # No tests in archive + doCheck = false; + + meta = with lib; { + description = "Renderer for the Dash framework"; + homepage = https://dash.plot.ly/; + license = licenses.mit; + maintainers = [ maintainers.antoinerg ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/dash-table/default.nix b/nixpkgs/pkgs/development/python-modules/dash-table/default.nix new file mode 100644 index 000000000000..4a9a6c42ff48 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/dash-table/default.nix @@ -0,0 +1,24 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "dash_table"; + version = "4.6.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "01wzac09ac6nr27if1liaxafzdf67x00vw1iq5vaad1147rdh36k"; + }; + + # No tests in archive + doCheck = false; + + meta = with lib; { + description = "A First-Class Interactive DataTable for Dash"; + homepage = https://dash.plot.ly/datatable; + license = licenses.mit; + maintainers = [ maintainers.antoinerg ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/dash/default.nix b/nixpkgs/pkgs/development/python-modules/dash/default.nix new file mode 100644 index 000000000000..2106235230f8 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/dash/default.nix @@ -0,0 +1,63 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, plotly +, flask +, flask-compress +, future +, dash-core-components +, dash-renderer +, dash-html-components +, dash-table +, pytest +, pytest-mock +, mock +}: + +buildPythonPackage rec { + pname = "dash"; + version = "1.8.0"; + + src = fetchFromGitHub { + owner = "plotly"; + repo = pname; + rev = "v${version}"; + sha256 = "11skbvjlj93aw1pqx6j56h73sy9r06jwq7z5h64fd1a3d4z2gsvy"; + }; + + propagatedBuildInputs = [ + plotly + flask + flask-compress + future + dash-core-components + dash-renderer + dash-html-components + dash-table + ]; + + checkInputs = [ + pytest + pytest-mock + mock + ]; + + checkPhase = '' + pytest tests/unit/test_configs.py + pytest tests/unit/test_fingerprint.py + pytest tests/unit/test_import.py + pytest tests/unit/test_resources.py + pytest tests/unit/dash/ + ''; + + pythonImportsCheck = [ + "dash" + ]; + + meta = with lib; { + description = "Python framework for building analytical web applications"; + homepage = https://dash.plot.ly/; + license = licenses.mit; + maintainers = [ maintainers.antoinerg ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/denonavr/default.nix b/nixpkgs/pkgs/development/python-modules/denonavr/default.nix new file mode 100644 index 000000000000..33c1570060e5 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/denonavr/default.nix @@ -0,0 +1,29 @@ +{ lib, buildPythonPackage, fetchFromGitHub, isPy27, requests +, pytest, testtools, requests-mock }: + +buildPythonPackage rec { + pname = "denonavr"; + version = "0.7.10"; + + src = fetchFromGitHub { + owner = "scarface-4711"; + repo = "denonavr"; + rev = version; + sha256 = "078nhr69f68nfazhmkf2sl7wiadqx96a5ry3ziggiy1xs04vflj7"; + }; + + propagatedBuildInputs = [ requests ]; + + doCheck = !isPy27; + checkInputs = [ pytest testtools requests-mock ]; + checkPhase = '' + pytest tests + ''; + + meta = with lib; { + homepage = "https://github.com/scarface-4711/denonavr"; + description = "Automation Library for Denon AVR receivers."; + license = licenses.mit; + maintainers = with maintainers; [ colemickens ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/django-extensions/default.nix b/nixpkgs/pkgs/development/python-modules/django-extensions/default.nix index 4dc286ae1b37..d62542536768 100644 --- a/nixpkgs/pkgs/development/python-modules/django-extensions/default.nix +++ b/nixpkgs/pkgs/development/python-modules/django-extensions/default.nix @@ -16,10 +16,10 @@ buildPythonPackage rec { sha256 = "0053yqq4vq3mwy7zkfs5vfm3g8j9sfy3vrc6xby83qlj9wz43ipi"; }; - # This patch can be removed when updating this pkg to the next version + # This patch fixes a single failing test and can be removed when updating this pkg + # to the next version patches = [ (fetchpatch { - # Commit title: fix highlighting test url = "https://github.com/django-extensions/django-extensions/commit/1d21786da2e6868d98ae34c82079e1e03ad1aa97.patch"; sha256 = "0d81zpj0f8a7ijrfb12j0b67fgj89k3axaskz1nwqsr4wc6n4bw2"; }) diff --git a/nixpkgs/pkgs/development/python-modules/django/2_1.nix b/nixpkgs/pkgs/development/python-modules/django/2_1.nix deleted file mode 100644 index 19e8b0c1a751..000000000000 --- a/nixpkgs/pkgs/development/python-modules/django/2_1.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ stdenv, buildPythonPackage, fetchPypi, substituteAll, - isPy3k, - geos, gdal, pytz, - withGdal ? false -}: - -buildPythonPackage rec { - pname = "Django"; - version = "2.1.15"; - - disabled = !isPy3k; - - src = fetchPypi { - inherit pname version; - sha256 = "a794f7a2f4b7c928eecfbc4ebad03712ff27fb545abe269bf01aa8500781eb1c"; - }; - - patches = stdenv.lib.optionals withGdal [ - (substituteAll { - src = ./1.10-gis-libs.template.patch; - geos = geos; - gdal = gdal; - extension = stdenv.hostPlatform.extensions.sharedLibrary; - }) - ]; - - propagatedBuildInputs = [ pytz ]; - - # too complicated to setup - doCheck = false; - - meta = with stdenv.lib; { - description = "A high-level Python Web framework"; - homepage = https://www.djangoproject.com/; - license = licenses.bsd3; - maintainers = with maintainers; [ georgewhewell ]; - }; -} diff --git a/nixpkgs/pkgs/development/python-modules/drf-yasg/default.nix b/nixpkgs/pkgs/development/python-modules/drf-yasg/default.nix new file mode 100644 index 000000000000..707b1e5bc6e2 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/drf-yasg/default.nix @@ -0,0 +1,40 @@ +{ + stdenv, + buildPythonPackage, + fetchPypi, + inflection, + ruamel_yaml, + setuptools_scm, + six, + coreapi, + djangorestframework, +}: + +buildPythonPackage rec { + pname = "drf-yasg"; + version = "1.16.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0ri5h5xsacm99c6gvb4ldwisbqgiv2vq8qbn7vrh6vplzlpyvzb8"; + }; + + nativeBuildInputs = [ + setuptools_scm + ]; + + propagatedBuildInputs = [ + six + inflection + ruamel_yaml + coreapi + djangorestframework + ]; + + meta = with stdenv.lib; { + description = "Generation of Swagger/OpenAPI schemas for Django REST Framework"; + homepage = https://github.com/axnsan12/drf-yasg; + maintainers = with maintainers; [ ivegotasthma ]; + license = licenses.bsd3; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/flask-sockets/default.nix b/nixpkgs/pkgs/development/python-modules/flask-sockets/default.nix new file mode 100644 index 000000000000..aa29fd4fbc94 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/flask-sockets/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, flask +, gevent +, gevent-websocket +}: + +buildPythonPackage rec { + pname = "Flask-Sockets"; + version = "0.2.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "072927da8edca0e81e024f5787e643c87d80b351b714de95d723becb30e0643b"; + }; + + propagatedBuildInputs = [ + flask + gevent + gevent-websocket + ]; + + # upstream doesn't have any tests, single file + doCheck = false; + + pythonImportsCheck = [ + "flask_sockets" + ]; + + meta = with lib; { + description = "Elegant WebSockets for your Flask apps"; + homepage = "https://github.com/heroku-python/flask-sockets"; + license = licenses.mit; + maintainers = [ maintainers.prusnak ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/fluidasserts/default.nix b/nixpkgs/pkgs/development/python-modules/fluidasserts/default.nix new file mode 100644 index 000000000000..f76692c50d97 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/fluidasserts/default.nix @@ -0,0 +1,167 @@ +{ buildPythonPackage +, fetchPypi +, isPy37 +, lib + +# pythonPackages +, aiohttp +, androguard +, azure-identity +, azure-keyvault-keys +, azure-keyvault-secrets +, azure-mgmt-compute +, azure-mgmt-keyvault +, azure-mgmt-network +, azure-mgmt-storage +, azure-mgmt-web +, azure-storage-file +, bandit +, bcrypt +, beautifulsoup4 +, boto3 +, cfn-flip +, cython +, dnspython +, colorama +, configobj +, defusedxml +, GitPython +, google_api_python_client +, kubernetes +, ldap3 +, mixpanel +, mysql-connector +, names +, ntplib +, oyaml +, paramiko +, pillow +, psycopg2 +, pycrypto +, pygments +, pyjks +, pynacl +, pyopenssl +, pypdf2 +, pysmb +, python_magic +, pytz +, requirements-detector +, selenium +, tlslite-ng +, viewstate + +# pythonPackages to test the derivation +, pytest +}: + +buildPythonPackage rec { + pname = "fluidasserts"; + version = "20.1.28253"; + disabled = !isPy37; + + src = fetchPypi { + inherit pname version; + extension = "zip"; + sha256 = "1d2smx9ywd1azsiwgavp69vlixmvwaabshprm192wnmprbghsp6c"; + }; + + patchPhase = '' + # Version mismatches between current FluidAsserts and Nixpkgs + substituteInPlace ./setup.py \ + --replace 'tlslite-ng==0.8.0-alpha29' 'tlslite-ng==0.7.5' \ + --replace 'boto3==1.10.17' 'boto3==1.10.1' \ + --replace 'cfn-flip==1.2.2' 'cfn-flip==1.1.0.post1' \ + --replace 'azure-mgmt-storage==7.1.0' 'azure-mgmt-storage==7.0.0' \ + + # Functionality that will be not present for the momment + # but that we'll work to add in the future + # Just a minimal portion of fluidasserts use this + substituteInPlace ./setup.py \ + --replace "'azure-storage-file-share==12.0.0'," "" \ + --replace "'pymssql==2.1.4'," "" \ + --replace "'pytesseract==0.3.0'," "" \ + --replace "'pywinrm==0.4.1'," "" \ + --replace "'mitmproxy==5.0.1'," "" \ + + ''; + + propagatedBuildInputs = [ + # pythonPackages + aiohttp + androguard + azure-identity + azure-keyvault-keys + azure-keyvault-secrets + azure-mgmt-compute + azure-mgmt-keyvault + azure-mgmt-network + azure-mgmt-storage + azure-mgmt-web + azure-storage-file + bandit + bcrypt + beautifulsoup4 + boto3 + cfn-flip + cython + dnspython + colorama + configobj + defusedxml + GitPython + google_api_python_client + kubernetes + ldap3 + mixpanel + mysql-connector + names + ntplib + oyaml + paramiko + pillow + psycopg2 + pycrypto + pygments + pyjks + pynacl + pyopenssl + pypdf2 + pysmb + python_magic + pytz + requirements-detector + selenium + tlslite-ng + viewstate + ]; + + checkInputs = [ + pytest + ]; + + checkPhase = '' + # This file launches mock docker containers and servers + # let's remove it to create a custom test environment + rm test/conftest.py + + pytest \ + test/test_cloud_aws_cloudformation_{cloudfront,dynamodb,ec2,elb,elb2}.py \ + test/test_cloud_aws_cloudformation_{fsx,iam,kms,rds,s3,secretsmanager}.py \ + test/test_format_{apk,file,jks,jwt,pdf,pkcs12,string}.py \ + test/test_helper_{asynchronous,crypto}.py \ + test/test_lang_{javascript,java}.py \ + test/test_lang_{core,csharp,docker,dotnetconfig,html,php,python,rpgle}.py \ + test/test_utils_generic.py + + ''; + + meta = with lib; { + description = "Assertion Library for Security Assumptions"; + homepage = "https://gitlab.com/fluidattacks/asserts"; + license = licenses.mpl20; + maintainers = with maintainers; [ + kamadorueda + ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/flux-led/default.nix b/nixpkgs/pkgs/development/python-modules/flux-led/default.nix new file mode 100644 index 000000000000..1cbfca78462f --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/flux-led/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub +, aiohttp, zigpy +, pytest, isPy27 }: + +buildPythonPackage rec { + pname = "flux_led"; + version = "0.22"; + disabled = isPy27; + + src = fetchFromGitHub { + owner = "Danielhiversen"; + repo = "flux_led"; + rev = version; + sha256 = "1zgajlkhclyrqhkmivna4ha2lyvfpk5929s042gy59p7mzpkvjx7"; + }; + + meta = with stdenv.lib; { + description = "A Python library to communicate with the flux_led smart bulbs"; + homepage = "https://github.com/Danielhiversen/flux_led"; + license = licenses.lgpl3; + maintainers = with maintainers; [ colemickens ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/getmac/default.nix b/nixpkgs/pkgs/development/python-modules/getmac/default.nix new file mode 100644 index 000000000000..51ce0ef05031 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/getmac/default.nix @@ -0,0 +1,26 @@ +{ lib, buildPythonPackage, fetchFromGitHub +, pytest, pytest-benchmark, pytest-mock }: + +buildPythonPackage rec { + pname = "getmac"; + version = "0.8.2"; + + src = fetchFromGitHub { + owner = "GhostofGoes"; + repo = "getmac"; + rev = version; + sha256 = "08d4iv5bjl1s4i9qhzf3pzjgj1rgbwi0x26qypf3ycgdj0a6gvh2"; + }; + + checkInputs = [ pytest pytest-benchmark pytest-mock ]; + checkPhase = '' + pytest --ignore tests/test_cli.py + ''; + + meta = with lib; { + homepage = "https://github.com/GhostofGoes/getmac"; + description = "Pure-Python package to get the MAC address of network interfaces and hosts on the local network."; + license = licenses.mit; + maintainers = with maintainers; [ colemickens ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/gpxpy/default.nix b/nixpkgs/pkgs/development/python-modules/gpxpy/default.nix new file mode 100644 index 000000000000..028ca3654236 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/gpxpy/default.nix @@ -0,0 +1,27 @@ +{ lib, fetchFromGitHub, buildPythonPackage, python, lxml }: + +buildPythonPackage rec { + pname = "gpxpy"; + version = "1.3.5"; + + src = fetchFromGitHub { + owner = "tkrajina"; + repo = pname; + rev = "v${version}"; + sha256 = "18r7pfda7g3l0hv8j9565n52cvvgjxiiqqzagfdfaba1djgl6p8b"; + }; + + propagatedBuildInputs = [ lxml ]; + + checkPhase = '' + ${python.interpreter} -m unittest test + ''; + + meta = with lib; { + description = "Python GPX (GPS eXchange format) parser"; + homepage = "https://github.com/tkrajina/gpxpy"; + license = licenses.asl20; + platforms = platforms.unix; + maintainers = with maintainers; [ sikmir ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/hypothesis/default.nix b/nixpkgs/pkgs/development/python-modules/hypothesis/default.nix index fdb5a69ddd79..9e3b0cdc894c 100644 --- a/nixpkgs/pkgs/development/python-modules/hypothesis/default.nix +++ b/nixpkgs/pkgs/development/python-modules/hypothesis/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { # pytz fake_factory django numpy pytest # If you need these, you can just add them to your environment. - version = "4.56.1"; + version = "4.41.0"; pname = "hypothesis"; # Use github tarballs that includes tests diff --git a/nixpkgs/pkgs/development/python-modules/itypes/default.nix b/nixpkgs/pkgs/development/python-modules/itypes/default.nix new file mode 100644 index 000000000000..1386ba39a268 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/itypes/default.nix @@ -0,0 +1,31 @@ +{ + stdenv, + fetchFromGitHub, + buildPythonPackage, + pytest, +}: + +buildPythonPackage rec { + pname = "itypes"; + version = "1.1.0"; + + src = fetchFromGitHub { + repo = pname; + owner = "tomchristie"; + rev = version; + sha256 = "0zkhn16wpslkxkq77dqw5rxa28nrchcb6nd3vgnxv91p4skyfm62"; + }; + + checkInputs = [ pytest ]; + checkPhase = '' + mv itypes.py itypes.py.hidden + pytest tests.py + ''; + + meta = with stdenv.lib; { + description = "Simple immutable types for python"; + homepage = https://github.com/tomchristie/itypes; + license = licenses.bsd3; + maintainers = with maintainers; [ ivegotasthma ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/mailmanclient/default.nix b/nixpkgs/pkgs/development/python-modules/mailmanclient/default.nix index fe52eda2e1ae..247a7ed1b004 100644 --- a/nixpkgs/pkgs/development/python-modules/mailmanclient/default.nix +++ b/nixpkgs/pkgs/development/python-modules/mailmanclient/default.nix @@ -1,8 +1,9 @@ -{ stdenv, buildPythonPackage, fetchPypi, six, httplib2, requests }: +{ stdenv, buildPythonPackage, fetchPypi, isPy3k, six, httplib2, requests }: buildPythonPackage rec { pname = "mailmanclient"; version = "3.3.0"; + disabled = !isPy3k; src = fetchPypi { inherit pname version; diff --git a/nixpkgs/pkgs/development/python-modules/mixpanel/default.nix b/nixpkgs/pkgs/development/python-modules/mixpanel/default.nix index e770eedbfc31..fac1afe2c97b 100644 --- a/nixpkgs/pkgs/development/python-modules/mixpanel/default.nix +++ b/nixpkgs/pkgs/development/python-modules/mixpanel/default.nix @@ -1,30 +1,46 @@ -{ stdenv -, buildPythonPackage -, fetchzip -, pytest + +{ buildPythonPackage +, fetchFromGitHub +, isPy37 +, lib + +# Python Dependencies , mock +, pytest , six -, isPy3k }: buildPythonPackage rec { - version = "4.0.2"; pname = "mixpanel"; - disabled = isPy3k; + version = "4.5.0"; + disabled = !isPy37; - src = fetchzip { - url = "https://github.com/mixpanel/mixpanel-python/archive/${version}.zip"; - sha256 = "0yq1bcsjzsz7yz4rp69izsdn47rvkld4wki2xmapp8gg2s9i8709"; + src = fetchFromGitHub { + owner = "mixpanel"; + repo = "mixpanel-python"; + rev = version; + sha256 = "1hlc717wcn71i37ngsfb3c605rlyjhsn3v6b5bplq00373r4d39z"; }; - checkInputs = [ pytest mock ]; - propagatedBuildInputs = [ six ]; - checkPhase = "py.test tests.py"; + propagatedBuildInputs = [ + six + ]; - meta = with stdenv.lib; { - homepage = https://github.com/mixpanel/mixpanel-python; - description = ''This is the official Mixpanel Python library''; + checkInputs = [ + mock + pytest + ]; + + checkPhase = '' + py.test + ''; + + meta = with lib; { + homepage = "https://github.com/mixpanel/mixpanel-python"; + description = "Official Mixpanel Python library"; license = licenses.asl20; + maintainers = with maintainers; [ + kamadorueda + ]; }; - } diff --git a/nixpkgs/pkgs/development/python-modules/mysql-connector/default.nix b/nixpkgs/pkgs/development/python-modules/mysql-connector/default.nix index 00d869cb3913..61a055b5ea8a 100644 --- a/nixpkgs/pkgs/development/python-modules/mysql-connector/default.nix +++ b/nixpkgs/pkgs/development/python-modules/mysql-connector/default.nix @@ -1,19 +1,27 @@ { lib, buildPythonPackage, fetchFromGitHub -, protobuf +, python3, protobuf3_6 }: -buildPythonPackage rec { +let + python = python3.override { + packageOverrides = self: super: { + protobuf = super.protobuf.override { + protobuf = protobuf3_6; + }; + }; + }; +in buildPythonPackage rec { pname = "mysql-connector"; - version = "8.0.18"; + version = "8.0.19"; src = fetchFromGitHub { owner = "mysql"; repo = "mysql-connector-python"; rev = version; - sha256 = "0pf91vbjigjv621dar47r741yvmdmapxh60wp20nzvlx0xchbmcm"; + sha256 = "1jscmc5s7mwx43gvxjlqc30ylp5jjpmkqx7s3b9nllbh926p3ixg"; }; - propagatedBuildInputs = [ protobuf ]; + propagatedBuildInputs = with python.pkgs; [ protobuf dnspython ]; # Tests are failing (TODO: unknown reason) # TypeError: __init__() missing 1 required positional argument: 'string' diff --git a/nixpkgs/pkgs/development/python-modules/nest-asyncio/default.nix b/nixpkgs/pkgs/development/python-modules/nest-asyncio/default.nix index a88c07c99687..0016da922ff3 100644 --- a/nixpkgs/pkgs/development/python-modules/nest-asyncio/default.nix +++ b/nixpkgs/pkgs/development/python-modules/nest-asyncio/default.nix @@ -14,6 +14,11 @@ buildPythonPackage rec { sha256 = "7d4d7c1ca2aad0e5c2706d0222c8ff006805abfd05caa97e6127c8811d0f6adc"; }; + # tests not packaged with source dist as of 1.2.1/1.2.2, and + # can't check tests out of GitHub easily without specific commit IDs (no tagged releases) + doCheck = false; + pythonImportsCheck = [ "nest_asyncio" ]; + meta = with stdenv.lib; { homepage = https://github.com/erdewit/nest_asyncio; description = "Patch asyncio to allow nested event loops"; diff --git a/nixpkgs/pkgs/development/python-modules/onnx/default.nix b/nixpkgs/pkgs/development/python-modules/onnx/default.nix new file mode 100644 index 000000000000..3f3cf38f3332 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/onnx/default.nix @@ -0,0 +1,78 @@ +{ lib +, fetchpatch +, buildPythonPackage +, fetchPypi +, pythonOlder +, isPy27 +, cmake +, protobuf +, numpy +, six +, typing-extensions +, typing +, pytestrunner +, pytest +, nbval +, tabulate +}: + +buildPythonPackage rec { + pname = "onnx"; + version = "1.6.0"; + + # Due to Protobuf packaging issues this build of Onnx with Python 2 gives + # errors on import + disabled = isPy27; + + src = fetchPypi { + inherit pname version; + sha256 = "0ig33jl3591041lyylxp52yi20rfrcqx3i030hd6al8iabzc721v"; + }; + + # Remove the unqualified requirement for the typing package for running the + # tests. typing is already required for the installation, where it is + # correctly qualified so as to only be required for sufficiently old Python + # versions. + # This patch should be in the next release (>1.6). + patches = [ + (fetchpatch { + url = "https://github.com/onnx/onnx/commit/c963586d0f8dd5740777b2fd06f04ec60816de9f.patch"; + sha256 = "1hl26cw5zckc91gmh0bdah87jyprccxiw0f4i5h1gwkq28hm6wbj"; + }) + ]; + + nativeBuildInputs = [ cmake ]; + + propagatedBuildInputs = [ + protobuf + numpy + six + typing-extensions + ] ++ lib.optional (pythonOlder "3.5") [ typing ]; + + checkInputs = [ + pytestrunner + pytest + nbval + tabulate + ]; + + postPatch = '' + patchShebangs tools/protoc-gen-mypy.py + ''; + + # The executables are just utility scripts that aren't too important + postInstall = '' + rm -r $out/bin + ''; + + # The setup.py does all the configuration (running CMake) + dontConfigure = true; + + meta = { + homepage = http://onnx.ai; + description = "Open Neural Network Exchange"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.acairncross ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/plexapi/default.nix b/nixpkgs/pkgs/development/python-modules/plexapi/default.nix new file mode 100644 index 000000000000..ed95de9ffde6 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/plexapi/default.nix @@ -0,0 +1,26 @@ +{ lib, buildPythonPackage, fetchFromGitHub, requests +, tqdm, websocket_client, pytest, pillow, mock, isPy27 }: + +buildPythonPackage rec { + pname = "PlexAPI"; + version = "3.2.0"; + + src = fetchFromGitHub { + owner = "pkkid"; + repo = "python-plexapi"; + rev = version; + sha256 = "1rzy018zcsws56mcghnphhzwj650pwj7qg6nh9z1kjvgwwjfmghf"; + }; + + propagatedBuildInputs = [ requests tqdm websocket_client ]; + + checkInputs = [ pytest pillow ] + ++ lib.optionals isPy27 [ mock ]; + + meta = with lib; { + homepage = "https://github.com/pkkid/python-plexapi"; + description = "Python bindings for the Plex API"; + license = licenses.bsd3; + maintainers = with maintainers; [ colemickens ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/plexauth/default.nix b/nixpkgs/pkgs/development/python-modules/plexauth/default.nix new file mode 100644 index 000000000000..91407a907a44 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/plexauth/default.nix @@ -0,0 +1,31 @@ +{ lib, buildPythonPackage, fetchFromGitHub, aiohttp, isPy27 }: + +buildPythonPackage rec { + pname = "plexauth"; + version = "0.0.5"; + disabled = isPy27; + + src = fetchFromGitHub { + owner = "jjlawren"; + repo = "python-plexauth"; + rev = "v${version}"; + sha256 = "1wbrn22iywl4ccz64r3w3f17k0r7vi2cqkqd2mrdkx5xqhscn9hz"; + }; + + propagatedBuildInputs = [ aiohttp ]; + + # package does not include tests + doCheck = false; + + # at least guarantee the module can be imported + pythonImportsCheck = [ + "plexauth" + ]; + + meta = with lib; { + homepage = "https://github.com/jjlawren/python-plexauth/"; + description = "Handles the authorization flow to obtain tokens from Plex.tv via external redirection"; + license = licenses.mit; + maintainers = with maintainers; [ colemickens ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/plexwebsocket/default.nix b/nixpkgs/pkgs/development/python-modules/plexwebsocket/default.nix new file mode 100644 index 000000000000..383a37cee3fe --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/plexwebsocket/default.nix @@ -0,0 +1,31 @@ +{ lib, buildPythonPackage, fetchFromGitHub, aiohttp, isPy27 }: + +buildPythonPackage rec { + pname = "plexwebsocket"; + version = "0.0.6"; + disabled = isPy27; + + src = fetchFromGitHub { + owner = "jjlawren"; + repo = "python-plexwebsocket"; + rev = "v${version}"; + sha256 = "1sy9khxksimcmdvghg1ksk65mkiihjvhi7m7ms2kzmy7mrg3s3i7"; + }; + + propagatedBuildInputs = [ aiohttp ]; + + # package does not include tests + doCheck = false; + + # at least guarantee the module can be imported + pythonImportsCheck = [ + "plexwebsocket" + ]; + + meta = with lib; { + homepage = "https://github.com/jjlawren/python-plexwebsocket/"; + description = "Async library to react to events issued over Plex websockets"; + license = licenses.mit; + maintainers = with maintainers; [ colemickens ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/publicsuffix/default.nix b/nixpkgs/pkgs/development/python-modules/publicsuffix/default.nix index 92a1f7c43a72..061ad6858614 100644 --- a/nixpkgs/pkgs/development/python-modules/publicsuffix/default.nix +++ b/nixpkgs/pkgs/development/python-modules/publicsuffix/default.nix @@ -10,9 +10,8 @@ buildPythonPackage rec { }; - # fix the ASCII-mode LICENSE file read # disable test_fetch and the doctests (which also invoke fetch) - patchPhase = '' + postPatch = '' sed -i -e "/def test_fetch/i\\ \\t@unittest.skip('requires internet')" -e "/def additional_tests():/,+1d" tests.py ''; diff --git a/nixpkgs/pkgs/development/python-modules/pyTelegramBotAPI/default.nix b/nixpkgs/pkgs/development/python-modules/pyTelegramBotAPI/default.nix new file mode 100644 index 000000000000..cb91196fc7e6 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pyTelegramBotAPI/default.nix @@ -0,0 +1,20 @@ +{ lib, buildPythonPackage, fetchPypi, requests }: + +buildPythonPackage rec { + pname = "pyTelegramBotAPI"; + version = "3.6.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "00vycd7jvfnzmvmmhkjx9vf40vkcrwv7adas5i81r2jhjy7sks54"; + }; + + propagatedBuildInputs = [ requests ]; + + meta = with lib; { + homepage = "https://github.com/eternnoir/pyTelegramBotAPI"; + description = "A simple, but extensible Python implementation for the Telegram Bot API"; + license = licenses.gpl2; + maintainers = with maintainers; [ das_j ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/pycurl/default.nix b/nixpkgs/pkgs/development/python-modules/pycurl/default.nix index 153a6e0377db..36e5b96319e3 100644 --- a/nixpkgs/pkgs/development/python-modules/pycurl/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pycurl/default.nix @@ -35,6 +35,7 @@ buildPythonPackage rec { flaky ]; + # skip impure or flakey tests checkPhase = '' HOME=$TMPDIR pytest tests -k "not test_ssl_in_static_libs \ and not test_keyfunction \ @@ -42,7 +43,8 @@ buildPythonPackage rec { and not test_libcurl_ssl_gnutls \ and not test_libcurl_ssl_nss \ and not test_libcurl_ssl_openssl" \ - --ignore=tests/getinfo_test.py + --ignore=tests/getinfo_test.py \ + --ignore=tests/memory_mgmt_test.py ''; preConfigure = '' diff --git a/nixpkgs/pkgs/development/python-modules/pydicom/default.nix b/nixpkgs/pkgs/development/python-modules/pydicom/default.nix new file mode 100644 index 000000000000..d281193be231 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pydicom/default.nix @@ -0,0 +1,28 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, pytest +, pytestrunner +, numpy +, pillow +}: + +buildPythonPackage rec { + version = "1.3.0"; + pname = "pydicom"; + + src = fetchPypi { + inherit pname version; + sha256 = "1j11lsykqbnw9d6gzgj6kfn6lawvm5d9azd9palj3l1xhj0hlnsq"; + }; + + propagatedBuildInputs = [ numpy pillow ]; + checkInputs = [ pytest pytestrunner ]; + + meta = with stdenv.lib; { + homepage = https://pydicom.github.io; + description = "Pure-Python package for working with DICOM files"; + license = licenses.mit; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/pyezminc/default.nix b/nixpkgs/pkgs/development/python-modules/pyezminc/default.nix deleted file mode 100644 index 614a1555cbef..000000000000 --- a/nixpkgs/pkgs/development/python-modules/pyezminc/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ buildPythonPackage, isPy3k, fetchFromGitHub, stdenv, - netcdf, hdf5, libminc, ezminc, - cython, numpy, scipy -}: - -buildPythonPackage rec { - pname = "pyezminc"; - version = "1.2.01"; - - disabled = isPy3k; - - src = fetchFromGitHub { - owner = "BIC-MNI"; - repo = "pyezminc"; - rev = "release-${version}"; - sha256 = "13smvramacisbwj8qsl160dnvv6ynngn1jmqwhvy146nmadphyv1"; - }; - - nativeBuildInputs = [ cython ]; - buildInputs = [ netcdf hdf5 libminc ezminc ]; - propagatedBuildInputs = [ numpy scipy ]; - - NIX_CFLAGS_COMPILE = "-fpermissive"; - - doCheck = false; # e.g., expects test data in /opt - - meta = { - homepage = https://github.com/BIC-MNI/pyezminc; - description = "Python API for libminc using EZMINC"; - license = stdenv.lib.licenses.gpl2; - maintainers = with stdenv.lib.maintainers; [ bcdarwin ]; - }; -} diff --git a/nixpkgs/pkgs/development/python-modules/pyicloud/default.nix b/nixpkgs/pkgs/development/python-modules/pyicloud/default.nix new file mode 100644 index 000000000000..50dd1a09890f --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pyicloud/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchPypi +, requests +, keyring +, keyrings-alt +, click +, six +, tzlocal +, certifi +, bitstring +, unittest2 +}: + +buildPythonPackage rec { + pname = "pyicloud"; + version = "0.9.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "580b52e95f67a41ed86c56a514aa2b362f53fbaf23f16c69fb24e0d19fd373ee"; + }; + + propagatedBuildInputs = [ + requests + keyring + keyrings-alt + click + six + tzlocal + certifi + bitstring + ]; + + checkInputs = [ unittest2 ]; + + postPatch = '' + sed -i \ + -e 's!click>=6.0,<7.0!click!' \ + -e 's!keyring>=8.0,<9.0!keyring!' \ + -e 's!keyrings.alt>=1.0,<2.0!keyrings.alt!' \ + requirements.txt + ''; + + meta = with lib; { + description = "PyiCloud is a module which allows pythonistas to interact with iCloud webservices"; + homepage = https://github.com/picklepete/pyicloud; + license = licenses.mit; + maintainers = [ maintainers.mic92 ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/pylint-celery/default.nix b/nixpkgs/pkgs/development/python-modules/pylint-celery/default.nix new file mode 100644 index 000000000000..6bc7a93049e9 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pylint-celery/default.nix @@ -0,0 +1,37 @@ +{ buildPythonPackage +, fetchFromGitHub +, isPy3k +, lib + +# pythonPackages +, pylint-plugin-utils +}: + +buildPythonPackage rec { + pname = "pylint-celery"; + version = "0.3"; + disabled = !isPy3k; + + src = fetchFromGitHub { + owner = "PyCQA"; + repo = pname; + rev = version; + sha256 = "05fhwraq12c2724pn4py1bjzy5rmsrb1x68zck73nlp5icba6yap"; + }; + + propagatedBuildInputs = [ + pylint-plugin-utils + ]; + + # Testing requires a very old version of pylint, incompatible with other dependencies + doCheck = false; + + meta = with lib; { + description = "A Pylint plugin to analyze Celery applications"; + homepage = "https://github.com/PyCQA/pylint-celery"; + license = licenses.gpl2; + maintainers = with maintainers; [ + kamadorueda + ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/pylint-django/default.nix b/nixpkgs/pkgs/development/python-modules/pylint-django/default.nix new file mode 100644 index 000000000000..04010098807c --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pylint-django/default.nix @@ -0,0 +1,39 @@ +{ buildPythonPackage +, fetchFromGitHub +, isPy3k +, lib + +# pythonPackages +, django +, pylint-plugin-utils +}: + +buildPythonPackage rec { + pname = "pylint-django"; + version = "2.0.12"; + disabled = !isPy3k; + + src = fetchFromGitHub { + owner = "PyCQA"; + repo = pname; + rev = "v${version}"; + sha256 = "0ha06wpqqn5fp5dapgjhsdx3ahh3y62l7k2f3czlrdjmmivgdp9y"; + }; + + propagatedBuildInputs = [ + django + pylint-plugin-utils + ]; + + # Testing requires checkout from other repositories + doCheck = false; + + meta = with lib; { + description = "A Pylint plugin to analyze Django applications"; + homepage = "https://github.com/PyCQA/pylint-django"; + license = licenses.gpl2; + maintainers = with maintainers; [ + kamadorueda + ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/pylint-flask/default.nix b/nixpkgs/pkgs/development/python-modules/pylint-flask/default.nix new file mode 100644 index 000000000000..5077d07a936b --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pylint-flask/default.nix @@ -0,0 +1,36 @@ +{ buildPythonPackage +, fetchPypi +, isPy3k +, lib + +# pythonPackages +, pylint-plugin-utils +}: + +buildPythonPackage rec { + pname = "pylint-flask"; + version = "0.6"; + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "05qmwgkpvaa5k05abqjxfbrfk3wpdqb8ph690z7bzxvb47i7vngl"; + }; + + propagatedBuildInputs = [ + pylint-plugin-utils + ]; + + # Tests require a very old version of pylint + # also tests are only available at GitHub, with an old release tag + doCheck = false; + + meta = with lib; { + description = "A Pylint plugin to analyze Flask applications"; + homepage = "https://github.com/jschaf/pylint-flask"; + license = licenses.gpl2; + maintainers = with maintainers; [ + kamadorueda + ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/pynrrd/default.nix b/nixpkgs/pkgs/development/python-modules/pynrrd/default.nix new file mode 100644 index 000000000000..02361fe84deb --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pynrrd/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, pytest +}: + +buildPythonPackage rec { + pname = "pynrrd"; + version = "0.4.2"; + + src = fetchFromGitHub { + owner = "mhe"; + repo = pname; + rev = "v${version}"; + sha256 = "1wn3ara3i19fi1y9a5j4imyczpa6dkkzd5djggxg4kkl1ff9awrj"; + }; + + propagatedBuildInputs = [ numpy ]; + + meta = with lib; { + homepage = https://github.com/mhe/pynrrd; + description = "Simple pure-Python reader for NRRD files"; + license = licenses.mit; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/pypandoc/default.nix b/nixpkgs/pkgs/development/python-modules/pypandoc/default.nix index 3af86dabe215..41576c5ad1fc 100644 --- a/nixpkgs/pkgs/development/python-modules/pypandoc/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pypandoc/default.nix @@ -1,33 +1,33 @@ -{ stdenv, buildPythonPackage, fetchPypi -, pip, pandoc, glibcLocales, haskellPackages, texlive }: +{ stdenv, buildPythonPackage, fetchFromGitHub +, pandoc, haskellPackages, texlive }: buildPythonPackage rec { pname = "pypandoc"; - version = "1.4"; + version = "unstable-2018-06-18"; - src = fetchPypi { - inherit pname version; - sha256 = "e914e6d5f84a76764887e4d909b09d63308725f0cbb5293872c2c92f07c11a5b"; + src = fetchFromGitHub { + owner = "bebraw"; + repo = pname; + rev = "87912f0f17e0a71c1160008df708c876d32e5819"; + sha256 = "0l6knkxxhmni4lx8hyvbb71svnhza08ivyklqlk5fw637gznc0hx"; }; - # Fix tests: first requires network access, second is a bug (reported upstream) - preConfigure = '' + postPatch = '' + # set pandoc path statically + sed -i '/^__pandoc_path = None$/c__pandoc_path = "${pandoc}/bin/pandoc"' pypandoc/__init__.py + + # Fix tests: requires network access substituteInPlace tests.py --replace "pypandoc.convert(url, 'html')" "'GPL2 license'" - substituteInPlace tests.py --replace "pypandoc.convert_file(file_name, lua_file_name)" "'<h1 id=\"title\">title</h1>'" ''; - LC_ALL="en_US.UTF-8"; - - propagatedBuildInputs = [ pip ]; - - buildInputs = [ pandoc texlive.combined.scheme-small haskellPackages.pandoc-citeproc glibcLocales ]; + preCheck = '' + export PATH="${haskellPackages.pandoc-citeproc}/bin:${texlive.combined.scheme-small}/bin:$PATH" + ''; meta = with stdenv.lib; { description = "Thin wrapper for pandoc"; homepage = https://github.com/bebraw/pypandoc; license = licenses.mit; - maintainers = with maintainers; [ bennofs ]; - - broken = true; # incompatible with pandoc v2 + maintainers = with maintainers; [ sternenseemann bennofs ]; }; } diff --git a/nixpkgs/pkgs/development/python-modules/python-miio/default.nix b/nixpkgs/pkgs/development/python-modules/python-miio/default.nix new file mode 100644 index 000000000000..eb7c91531965 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/python-miio/default.nix @@ -0,0 +1,39 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, appdirs +, click +, construct +, cryptography +, pytest +, zeroconf +, attrs +, pytz +, tqdm +, netifaces +}: + +buildPythonPackage rec { + pname = "python-miio"; + version = "0.4.8"; + + src = fetchPypi { + inherit pname version; + sha256 = "19423b3386b23d2e0fc94a8f6a358bcfbb44eed05376e33fd434d26d168bd18c"; + }; + + checkInputs = [ pytest ]; + propagatedBuildInputs = [ appdirs click construct cryptography zeroconf attrs pytz tqdm netifaces ]; + + checkPhase = '' + pytest + ''; + + meta = with stdenv.lib; { + description = "Python library for interfacing with Xiaomi smart appliances"; + homepage = https://github.com/rytilahti/python-miio; + license = licenses.gpl3; + maintainers = with maintainers; [ flyfloh ]; + }; +} + diff --git a/nixpkgs/pkgs/development/python-modules/python-olm/default.nix b/nixpkgs/pkgs/development/python-modules/python-olm/default.nix index 4fc0ad66f95b..b1e01f7f4abf 100644 --- a/nixpkgs/pkgs/development/python-modules/python-olm/default.nix +++ b/nixpkgs/pkgs/development/python-modules/python-olm/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, olm, - cffi, future, typing }: + cffi, future, isPy3k, typing }: buildPythonPackage { pname = "python-olm"; @@ -15,8 +15,7 @@ buildPythonPackage { propagatedBuildInputs = [ cffi future - typing - ]; + ] ++ lib.optionals (!isPy3k) [ typing ]; doCheck = false; diff --git a/nixpkgs/pkgs/development/python-modules/requirements-detector/default.nix b/nixpkgs/pkgs/development/python-modules/requirements-detector/default.nix index a0f312389f1a..0d91cbc7509f 100644 --- a/nixpkgs/pkgs/development/python-modules/requirements-detector/default.nix +++ b/nixpkgs/pkgs/development/python-modules/requirements-detector/default.nix @@ -4,6 +4,7 @@ , lib # pythonPackages +, astroid , pytest }: @@ -13,12 +14,16 @@ buildPythonPackage rec { disabled = isPy27; src = fetchFromGitHub { - owner = "yuvadm"; + owner = "landscapeio"; repo = pname; rev = version; - sha256 = "15s0n1lhkz0zwi33waqkkjipal3f7s45rxsj1bw89xpr4dj87qx5"; + sha256 = "1sfmm7daz0kpdx6pynsvi6qlfhrzxx783l1wb69c8dfzya4xssym"; }; + propagatedBuildInputs = [ + astroid + ]; + checkInputs = [ pytest ]; diff --git a/nixpkgs/pkgs/development/python-modules/runway-python/default.nix b/nixpkgs/pkgs/development/python-modules/runway-python/default.nix index 5c60b6379e93..fca11c100cf0 100644 --- a/nixpkgs/pkgs/development/python-modules/runway-python/default.nix +++ b/nixpkgs/pkgs/development/python-modules/runway-python/default.nix @@ -2,29 +2,38 @@ , buildPythonPackage , fetchPypi , flask +, flask-compress , flask-cors +, flask-sockets , numpy +, scipy , pillow , gevent , wget , six , colorcet +, unidecode +, urllib3 }: buildPythonPackage rec { pname = "runway-python"; - version = "0.5.7"; + version = "0.5.9"; src = fetchPypi { inherit pname version; - sha256 = "06e0138cc4cf2ddb7304502f5c7b53269ce73679c5784c8d6b423db04d179c18"; + sha256 = "1d75c44008275213034977c75bc2dc6f419e7f11d087984e3faea1e0cf6da69d"; }; - propagatedBuildInputs = [ flask flask-cors numpy pillow gevent wget six colorcet ]; + propagatedBuildInputs = [ flask flask-compress flask-cors flask-sockets numpy scipy pillow gevent wget six colorcet unidecode urllib3 ]; # tests are not packaged in the released tarball doCheck = false; + pythonImportsCheck = [ + "runway" + ]; + meta = { description = "Helper library for creating Runway models"; homepage = https://github.com/runwayml/model-sdk; diff --git a/nixpkgs/pkgs/development/python-modules/rxv/default.nix b/nixpkgs/pkgs/development/python-modules/rxv/default.nix new file mode 100644 index 000000000000..8133936798ed --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/rxv/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, defusedxml +, requests +, pytest +, requests-mock +, mock +, pytestcov +, pytest-timeout +, testtools +}: + +buildPythonPackage rec { + pname = "rxv"; + version = "0.6.0"; + + src = fetchFromGitHub { + owner = "wuub"; + repo = pname; + # Releases are not tagged + rev = "9b586203665031f93960543a272bb1a8f541ed37"; + sha256 = "1dw3ayrzknai2279bhkgzcapzw06rhijlny33rymlbp7irp0gvnj"; + }; + + propagatedBuildInputs = [ defusedxml requests ]; + + checkInputs = [ pytest requests-mock mock pytestcov pytest-timeout testtools ]; + checkPhase = '' + pytest + ''; + + meta = with lib; { + description = "Automation Library for Yamaha RX-V473, RX-V573, RX-V673, RX-V773 receivers"; + homepage = https://github.com/wuub/rxv; + license = licenses.mit; + maintainers = with maintainers; [ flyfloh ]; + }; +} + diff --git a/nixpkgs/pkgs/development/python-modules/sentry-sdk/default.nix b/nixpkgs/pkgs/development/python-modules/sentry-sdk/default.nix index 67584789995e..d556dcb74cf2 100644 --- a/nixpkgs/pkgs/development/python-modules/sentry-sdk/default.nix +++ b/nixpkgs/pkgs/development/python-modules/sentry-sdk/default.nix @@ -13,6 +13,7 @@ , pyramid , rq , sanic +, sqlalchemy , stdenv , tornado , urllib3 @@ -27,7 +28,7 @@ buildPythonPackage rec { sha256 = "c6b919623e488134a728f16326c6f0bcdab7e3f59e7f4c472a90eea4d6d8fe82"; }; - checkInputs = [ django flask tornado bottle rq falcon ] + checkInputs = [ django flask tornado bottle rq falcon sqlalchemy ] ++ stdenv.lib.optionals isPy3k [ celery pyramid sanic aiohttp ]; propagatedBuildInputs = [ urllib3 certifi ]; diff --git a/nixpkgs/pkgs/development/python-modules/setuptools/default.nix b/nixpkgs/pkgs/development/python-modules/setuptools/default.nix index f52a49313772..194b90cb42ad 100644 --- a/nixpkgs/pkgs/development/python-modules/setuptools/default.nix +++ b/nixpkgs/pkgs/development/python-modules/setuptools/default.nix @@ -13,7 +13,7 @@ let pname = "setuptools"; - version = "42.0.2"; + version = "44.0.0"; # Create an sdist of setuptools sdist = stdenv.mkDerivation rec { @@ -23,7 +23,7 @@ let owner = "pypa"; repo = pname; rev = "v${version}"; - sha256 = "1xqx3sha5ir40g1h15r7q063bcbl9bvh967vig574k3jgwxrz2ik"; + sha256 = "0z3q0qinyp1rmnxkw3y5f6nbsxhqlfq5k7skfrqa6ymb3zr009y1"; name = "${pname}-${version}-source"; }; diff --git a/nixpkgs/pkgs/development/python-modules/snitun/default.nix b/nixpkgs/pkgs/development/python-modules/snitun/default.nix index da9dbd798450..8212379e3d48 100644 --- a/nixpkgs/pkgs/development/python-modules/snitun/default.nix +++ b/nixpkgs/pkgs/development/python-modules/snitun/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, python, fetchFromGitHub, attrs, cryptography, async-timeout, pytest-aiohttp, pytest }: +{ lib, stdenv, buildPythonPackage, python, fetchFromGitHub, attrs, cryptography, async-timeout, pytest-aiohttp, pytest }: buildPythonPackage rec { pname = "snitun"; @@ -16,7 +16,8 @@ buildPythonPackage rec { checkInputs = [ pytest pytest-aiohttp ]; checkPhase = '' - pytest tests/ + # https://github.com/NabuCasa/snitun/issues/61 + pytest ${lib.optionalString stdenv.isDarwin "-k 'not test_multiplexer_data_channel_abort_full'"} tests/ ''; meta = with lib; { diff --git a/nixpkgs/pkgs/development/python-modules/solo-python/default.nix b/nixpkgs/pkgs/development/python-modules/solo-python/default.nix index 52d7d7539f92..1b1896187f9d 100644 --- a/nixpkgs/pkgs/development/python-modules/solo-python/default.nix +++ b/nixpkgs/pkgs/development/python-modules/solo-python/default.nix @@ -3,7 +3,7 @@ buildPythonPackage rec { pname = "solo-python"; - version = "0.0.18"; + version = "0.0.23"; format = "flit"; disabled = pythonOlder "3.6"; # only python>=3.6 is supported @@ -11,7 +11,7 @@ owner = "solokeys"; repo = pname; rev = version; - sha256 = "01mgppjvxlr93vrgz7bzisghpg1vqyaj4cg5wngk0h499iyx4d9q"; + sha256 = "0r9cq0sd8pqnavgwa5cqgdxzbgly2baq8fpclnnz6anb2974kg3f"; }; # replaced pinned fido, with unrestricted fido version @@ -48,6 +48,5 @@ homepage = "https://github.com/solokeys/solo-python"; maintainers = with maintainers; [ wucke13 ]; license = with licenses; [ asl20 mit ]; - broken = true; # no longer compatible with fido2 }; } diff --git a/nixpkgs/pkgs/development/python-modules/srsly/default.nix b/nixpkgs/pkgs/development/python-modules/srsly/default.nix index 2b87c38b0854..42d3da93c90e 100644 --- a/nixpkgs/pkgs/development/python-modules/srsly/default.nix +++ b/nixpkgs/pkgs/development/python-modules/srsly/default.nix @@ -12,11 +12,11 @@ buildPythonPackage rec { pname = "srsly"; - version = "0.2.0"; + version = "1.0.1"; src = fetchPypi { inherit pname version; - sha256 = "0gha1xfh64mapvgn0sghnjsvmjdrh5rywhs3j3bhkvwk42kf40ma"; + sha256 = "0d49a90gsfyxwp8g14mvvw1kjm77qgx86zg4812kcmlz9ycb80hi"; }; propagatedBuildInputs = lib.optional (pythonOlder "3.4") pathlib; diff --git a/nixpkgs/pkgs/development/python-modules/stups-pierone/default.nix b/nixpkgs/pkgs/development/python-modules/stups-pierone/default.nix new file mode 100644 index 000000000000..aaa049916411 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/stups-pierone/default.nix @@ -0,0 +1,47 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, requests +, stups-cli-support +, stups-zign +, pytest +, pytestcov +, hypothesis +, isPy3k +}: + +buildPythonPackage rec { + pname = "stups-pierone"; + version = "1.1.45"; + disabled = !isPy3k; + + src = fetchFromGitHub { + owner = "zalando-stups"; + repo = "pierone-cli"; + rev = version; + sha256 = "1ggfizw27wpcagbbk15xpfrhq6b250cx4278b5d7y8s438g128cs"; + }; + + propagatedBuildInputs = [ + requests + stups-cli-support + stups-zign + ]; + + preCheck = " + export HOME=$TEMPDIR + "; + + checkInputs = [ + pytest + pytestcov + hypothesis + ]; + + meta = with lib; { + description = "Convenient command line client for STUPS' Pier One Docker registry"; + homepage = "https://github.com/zalando-stups/pierone-cli"; + license = licenses.asl20; + maintainers = [ maintainers.mschuwalow ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/sysv_ipc/default.nix b/nixpkgs/pkgs/development/python-modules/sysv_ipc/default.nix new file mode 100644 index 000000000000..37853980f43a --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/sysv_ipc/default.nix @@ -0,0 +1,22 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "sysv_ipc"; + version = "1.0.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1p5lx3yz4p40rfb453m80a4hh8341yp4dki2nhhxz7bq2zfi1zwf"; + }; + + meta = with stdenv.lib; { + description = "SysV IPC primitives (semaphores, shared memory and message queues)"; + license = licenses.bsd3; + homepage = http://semanchuk.com/philip/sysv_ipc/; + maintainers = with maintainers; [ ris ]; + }; + +} |