Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up coveralls.io hook #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ mapnik/paths.py
.mason/
mason_packages/
mapnik/plugins
.coverage
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,22 @@ before_install:
- PYTHONUSERBASE=$(pwd)/mason_packages/.link pip install --user nose
- PYTHONUSERBASE=$(pwd)/mason_packages/.link pip install --user wheel
- PYTHONUSERBASE=$(pwd)/mason_packages/.link pip install --user twine
# prevent from compiling libyaml (which fails with clang) when installing PyYAML as python-coveralls dependency
- PYTHONUSERBASE=$(pwd)/mason_packages/.link pip install --user --global-option="--without-libyaml" PyYAML
- PYTHONUSERBASE=$(pwd)/mason_packages/.link pip install --user --no-compile python-coveralls
- python --version

install:
- python setup.py install --prefix $(pwd)/mason_packages/.link

before_script:
- python test/run_tests.py -q

script:
- python test/visual.py -q
- python setup.py nosetests --with-coverage --cover-package=mapnik

after_script:
- coveralls

after_success:
- if [[ ${COMMIT_MESSAGE} =~ "[publish]" ]]; then
python setup.py bdist_wheel;
if [[ $(uname -s) == 'Linux' ]]; then
Expand Down
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,12 @@ def run(self):
linkflags = check_output([mapnik_config, '--libs']).split(' ')
lib_path = linkflags[0][2:]
linkflags.extend(check_output([mapnik_config, '--ldflags']).split(' '))
except:
raise Exception("Failed to find proper linking flags from mapnik config")
except OSError:
msg = "Missing mapnik-config binary, expected at %s" % mapnik_config
raise Exception(msg)
except Exception as e:
msg = "Failed to find proper linking flags from mapnik config: %s" % str(e)
raise Exception(msg)

# Dynamically make the mapnik/paths.py file if it doesn't exist.
if os.path.isfile('mapnik/paths.py'):
Expand Down