git.iko.soy/typeable/nixpkgs
on master help sign in
python pygal: init at 2.0.8
commit810fc8dd70001229157d417cc35282ab8bacf423 authorStéphane Jourdois <sjourdois@gmail.com> dateWed 28 Oct 2015, 18:56 (11 years ago) parente6c6b4a
1 file changed+44
pkgs/top-level/python-packages.nix+44
pkgs/top-level/python-packages.nix+44
@@ -9274,6 +9274,50 @@ let
92749274 preConfigure = "substituteInPlace setup.py --replace /usr/share usr/share";
92759275 };
92769276
9277+ pygal = buildPythonPackage ( rec {
9278+ version = "2.0.8";
9279+ name = "pygal-${version}";
9280+
9281+ patchPhase = ''
9282+ # Run tests in pygal dir
9283+ substituteInPlace setup.py \
9284+ --replace "self.test_args = []" \
9285+ "self.test_args = ['-x', 'build/lib/pygal']"
9286+ # Open unicode files during tests
9287+ substituteInPlace pygal/test/test_graph.py \
9288+ --replace "import sys" \
9289+ "import sys, io"
9290+ substituteInPlace pygal/test/test_graph.py \
9291+ --replace "open(file_name)" \
9292+ "io.open(file_name, encoding='utf-8')"
9293+ # Use explicit integers (for python 3.5)
9294+ substituteInPlace pygal/colors.py \
9295+ --replace "'#%x%x%x' % (r / 17, g / 17, b / 17)" \
9296+ "'#%x%x%x' % (r // 17, g // 17, b // 17)"
9297+ substituteInPlace pygal/colors.py \
9298+ --replace "'#%x%x%x%x' % (r / 17, g / 17, b / 17, a * 15)" \
9299+ "'#%x%x%x%x' % (r // 17, g // 17, b // 17, int(a * 15))"
9300+ substituteInPlace pygal/colors.py \
9301+ --replace "'#%02x%02x%02x%02x' % (r, g, b, a * 255)" \
9302+ "'#%02x%02x%02x%02x' % (r, g, b, int(a * 255))"
9303+ '';
9304+
9305+ src = pkgs.fetchurl {
9306+ url = "https://github.com/Kozea/pygal/archive/${version}.tar.gz";
9307+ sha256 = "1lv8avn7pdlxks50sd58shpqnxybf3l79bggy32qnbqczk4j2s0b";
9308+ };
9309+
9310+ buildInputs = with self; [ flask pyquery pytest ];
9311+ propagatedBuildInputs = with self; [ cairosvg tinycss cssselect ] ++ optionals (!isPyPy) [ lxml ];
9312+
9313+ meta = {
9314+ description = "Sexy and simple python charting";
9315+ homepage = http://www.pygal.org;
9316+ license = licenses.lgpl3;
9317+ };
9318+ });
9319+
9320+
92779321 pymysql = buildPythonPackage rec {
92789322 name = "pymysql-${version}";
92799323 version = "0.6.6";