From 7a41bef7335ee5ea16a6ec4ea4a619d029b1fef3 Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 30 Sep 2015 10:50:22 -0700 Subject: [PATCH 1/4] clean up executable definition in configuration --- pdfkit/configuration.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pdfkit/configuration.py b/pdfkit/configuration.py index cc1fbec..d97a9f8 100644 --- a/pdfkit/configuration.py +++ b/pdfkit/configuration.py @@ -1,15 +1,14 @@ # -*- coding: utf-8 -*- -import os import subprocess import sys from pkg_resources import resource_filename -executable = resource_filename('pdfkit', 'wkhtmltopdf.exe') class Configuration(object): - def __init__(self, wkhtmltopdf=executable, meta_tag_prefix='pdfkit-'): + def __init__(self, wkhtmltopdf=None, meta_tag_prefix='pdfkit-'): self.meta_tag_prefix = meta_tag_prefix - + if wkhtmltopdf is None: + wkhtmltopdf = resource_filename('pdfkit', 'wkhtmltopdf.exe') self.wkhtmltopdf = wkhtmltopdf if not self.wkhtmltopdf: From 8a98976dd951df9a678f66bbe16fc39db3737ced Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 30 Sep 2015 10:50:49 -0700 Subject: [PATCH 2/4] restore attribution to original library --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c3c69cb..b0590d8 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ def long_description(): version=pdfkit.__version__, description=pdfkit.__doc__.strip(), long_description=long_description(), - download_url='https://github.com/Geosyntec/python-pdfkit', + download_url='https://github.com/JazzCore/python-pdfkit', license=pdfkit.__license__, tests_require=['pytest'], cmdclass = {'test': PyTest}, From d1112ecdfcc371dcbfd97a55c96ae8b527ab01fb Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 30 Sep 2015 10:58:25 -0700 Subject: [PATCH 3/4] add conda recipe --- conda-recipe/python-pdfkit/bld.bat | 8 ++++++ conda-recipe/python-pdfkit/build.sh | 9 ++++++ conda-recipe/python-pdfkit/meta.yaml | 42 ++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 conda-recipe/python-pdfkit/bld.bat create mode 100644 conda-recipe/python-pdfkit/build.sh create mode 100644 conda-recipe/python-pdfkit/meta.yaml diff --git a/conda-recipe/python-pdfkit/bld.bat b/conda-recipe/python-pdfkit/bld.bat new file mode 100644 index 0000000..87b1481 --- /dev/null +++ b/conda-recipe/python-pdfkit/bld.bat @@ -0,0 +1,8 @@ +"%PYTHON%" setup.py install +if errorlevel 1 exit 1 + +:: Add more build steps here, if they are necessary. + +:: See +:: http://docs.continuum.io/conda/build.html +:: for a list of environment variables that are set during the build process. diff --git a/conda-recipe/python-pdfkit/build.sh b/conda-recipe/python-pdfkit/build.sh new file mode 100644 index 0000000..4d7fc03 --- /dev/null +++ b/conda-recipe/python-pdfkit/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +$PYTHON setup.py install + +# Add more build steps here, if they are necessary. + +# See +# http://docs.continuum.io/conda/build.html +# for a list of environment variables that are set during the build process. diff --git a/conda-recipe/python-pdfkit/meta.yaml b/conda-recipe/python-pdfkit/meta.yaml new file mode 100644 index 0000000..4e970f4 --- /dev/null +++ b/conda-recipe/python-pdfkit/meta.yaml @@ -0,0 +1,42 @@ +package: + name: pdfkit + version: 0.5.1 + +source: + git_url: https://github.com/Geosyntec/python-pdfkit.git + git_tag: 0.5.1geo +# patches: + # List any patch files here + # - fix.patch + +build: + noarch_python: False + number: 1 + +requirements: + build: + - python + - setuptools + + run: + - python + - setuptools + +test: + imports: + - pdfkit + + # commands: + # - py.test + + requires: + - pytest + +about: + home: https://github.com/Geosyntec/python-pdfkit.git + license: MIT License + summary: 'Wkhtmltopdf python wrapper to convert html to pdf using the webkit rendering engine and qt' + +# See +# http://docs.continuum.io/conda/build.html for +# more information about meta.yaml/configure From d017b8487587365b8a30313dd31b76e741264fbb Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 30 Sep 2015 11:06:17 -0700 Subject: [PATCH 4/4] force use of sudo in travis --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 15dc4fe..36828ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,8 @@ +sudo: true language: python python: - 2.7 - - 3.2 + - 3.2 - 3.3 before_script: "./travis/before-script.sh" script: python setup.py test