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 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 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: 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},