Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix multiarch support on Debian/Ubuntu #4

Merged
merged 1 commit into from

2 participants

@noirbizarre

Allow installation from pip/easy_install on multiarch enabled distrib.

See https://wiki.ubuntu.com/MultiarchSpec

I think there some fix to apply to mapnik-utils too.

Backporting to 2.0.x to have it in pypi would be very nice!

@kiorky kiorky merged commit b5d1a5b into mapnik:master
@kiorky
Collaborator

Thx !

@kiorky
Collaborator

I can also make you co maintainer of pypi, just give me your id.
Just use zest.releaser's fullrelease (see buildout) to make a proper release.

@noirbizarre

Glad to help!!
Here's my pypi ID: noirbizarre (same as github)

I don't much about zest-releaser but it seems interesting.
I going learn about it right now!

Thanks!

@kiorky
Collaborator

added to pypi as maintainer

basically:

  • have the buildout running
  • easy_install -U setuptools_git (you need it both in your buildout scripts & in your python because zest.releaser calls directly python under the hood)
  • then when you release, commits what it needs to, but dont increment any version stuff nor update the date in CHANGES because it is handled by zest.releaser
  • finally use the magical bin/fullrelease, answer the questions are you are done.
    • tag creation, version increment, date update, pypi & github checkins will be handled for you
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 3, 2012
  1. @noirbizarre
This page is out of date. Refresh to see the latest.
Showing with 19 additions and 2 deletions.
  1. +19 −2 src/mapnik/utils.py
View
21 src/mapnik/utils.py
@@ -2,7 +2,7 @@
import re
import os
-from subprocess import Popen, PIPE
+from subprocess import Popen, PIPE, check_output
from ctypes import CDLL
def read(rnames):
@@ -37,7 +37,7 @@ def get_config_output(exe, args):
if ret.wait() != 0:
raise Exception(
'%s error: %s\n%s' % (
- cmd,
+ cmd,
ret.stdout.read(),
ret.stderr.read(),
)
@@ -91,6 +91,21 @@ def get_boost_flags():
raise Exception('Cant find boost_python lib!')
return {'includes': includes, 'libraries': libraries}
+
+def add_multiarch_paths(flags):
+ '''
+ Find multiarchs specifics paths for Debian/Ubuntu.
+ See https://wiki.ubuntu.com/MultiarchSpec
+ Could be fixed in Scons and/or mapnik-utils
+ '''
+ try:
+ arch = check_output(['dpkg-architecture', '-qDEB_HOST_MULTIARCH'])
+ arch = arch[:-1] if arch.endswith('\n') else arch
+ flags['includes'].append('-I/usr/lib/%s/sigc++-2.0/include' % arch)
+ except:
+ pass
+
+
def get_compilation_flags():
compilation_flags = {
'includes': [],
@@ -104,6 +119,8 @@ def get_compilation_flags():
compilation_flags['libraries'].extend(bf['libraries'])
compilation_flags['includes'].extend(mapnik_config(["--cflags"]).split())
compilation_flags['extra_link_args'].extend(mapnik_config(["--libs"]).split())
+ if sys.platform.startswith("linux"):
+ add_multiarch_paths(compilation_flags)
return compilation_flags
Something went wrong with that request. Please try again.