git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #139474 from fabaff/fix-imddpy

python3Packages.imdbpy: remove patch

commitd49ddc24b6ca2bc78a730b3ec10e7f46c02b1840 authorFabian Affolter <fabian@affolter-engineering.ch> dateSun 26 Sep 2021, 10:22 (5 years ago) parent29e399bd3e5937
2 files changed+17−47
pkgs/development/python-modules/imdbpy/default.nix+17−8 pkgs/development/python-modules/imdbpy/sql_error.patch−39
pkgs/development/python-modules/imdbpy/default.nix+17−8
@@ -1,25 +1,34 @@
1−{ lib, buildPythonPackage, fetchPypi, lxml, sqlalchemy }:
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, lxml
5+, sqlalchemy
6+}:
27
38buildPythonPackage rec {
4− pname = "IMDbPY";
9+ pname = "imdbpy";
510 version = "2021.4.18";
611
712 src = fetchPypi {
8− inherit pname version;
13+ pname = "IMDbPY";
14+ inherit version;
915 sha256 = "af57f03638ba3b8ab3d696bfef0eeaf6414385c85f09260aba0a16b32174853f";
1016 };
1117
12− patches = [ ./sql_error.patch ]; # Already fixed in master, but not yet in the current release. This can be removed upon the next version update
18+ propagatedBuildInputs = [
19+ lxml
20+ sqlalchemy
21+ ];
1322
14− propagatedBuildInputs = [ lxml sqlalchemy ];
23+ # Tests require networking, and https://github.com/alberanid/imdbpy/issues/240
24+ doCheck = false;
1525
16− doCheck = false; # Tests require networking, and https://github.com/alberanid/imdbpy/issues/240
1726 pythonImportsCheck = [ "imdb" ];
1827
1928 meta = with lib; {
29+ description = "Python package for retrieving and managing the data of the IMDb database";
2030 homepage = "https://imdbpy.github.io/";
21− description = "A Python package for retrieving and managing the data of the IMDb database";
22− maintainers = [ maintainers.ivar ];
2331 license = licenses.gpl2Only;
32+ maintainers = with maintainers; [ ivar ];
2433 };
2534}
pkgs/development/python-modules/imdbpy/sql_error.patchdeleted−39
@@ -1,39 +0,0 @@
1−diff --git a/imdb/parser/sql/__init__.py b/imdb/parser/sql/__init__.py
2−index cd4a3e3..3fcfdd4 100644
3−--- a/imdb/parser/sql/__init__.py
4−+++ b/imdb/parser/sql/__init__.py
5−@@ -557,7 +557,6 @@ class IMDbSqlAccessSystem(IMDbBase):
6− """The class used to access IMDb's data through a SQL database."""
7−
8− accessSystem = 'sql'
9−- _sql_logger = logging.getLogger('imdbpy.parser.sql')
10−
11− def __init__(self, uri, adultSearch=True, *arguments, **keywords):
12− """Initialize the access system."""
13−@@ -582,7 +581,7 @@ class IMDbSqlAccessSystem(IMDbBase):
14− except ImportError as e:
15− raise IMDbError('unable to import SQLAlchemy')
16− # Set the connection to the database.
17−- self._sql_logger.debug('connecting to %s', uri)
18−+ logger.debug('connecting to %s', uri)
19− try:
20− self._connection = setConnection(uri, DB_TABLES)
21− except AssertionError as e:
22−@@ -593,7 +592,7 @@ class IMDbSqlAccessSystem(IMDbBase):
23− # Maps some IDs to the corresponding strings.
24− self._kind = {}
25− self._kindRev = {}
26−- self._sql_logger.debug('reading constants from the database')
27−+ logger.debug('reading constants from the database')
28− try:
29− for kt in KindType.select():
30− self._kind[kt.id] = kt.kind
31−@@ -1616,7 +1615,7 @@ class IMDbSqlAccessSystem(IMDbBase):
32− return
33− if not hasattr(self, '_connection'):
34− return
35−- self._sql_logger.debug('closing connection to the database')
36−+ logger.debug('closing connection to the database')
37− try:
38− self._connection.close()
39− except: