Make setup.py work on all major systems #21

Open
gka opened this Issue Mar 12, 2012 · 7 comments

Comments

Projects
None yet
7 participants
Owner

gka commented Mar 12, 2012

Currently setup.py install doesn't work on some systems (especially not on windows).

Owner

gka commented Mar 12, 2012

I tried to install on a fresh win xp system and ran into the following problems:

  • Since there was no git installed I needed to download the Kartograph repository as zip
  • Also, Python was not installed. After installing it I needed to add the python path to the PATH environment
    set PATH=%PATH%;c:\Python27\
  • The setuptools package is not included in python so I needed to install it manually using the windows setuptools intaller
  • After running python setup.py install I got the error message error: Setup script exited with error: Unable to find vcvarsall.bat when setuptools tried to compile the missing Polygon package. From looking up the error message (for instances here) I learned that I would need the gcc compiler from MinGW, so I installed it.
  • Also I created a file c:\python27\Lib\distutils\distutils.cfgwith the following contents:[build] compiler=mingw32
  • Running the setup script again now showed up a new error message:
Running Polygon-3.0.4\setup.py -q bdist_egg --dist-dir c:\docume~1\admini~1\locals~1\temp\ea
sy_install-a3g3pd\Polygon-3.0.4\egg-dist-tmp-mzvt6dcc1.exe: 
error: unrecognized command line option '-mno-cygwin'
error: Setup script exited with error: command 'gcc' failed with exit status 1

The setup.py does not seem to work under OS X 10.7 (with gcc 4.2). The version of polygon referenced does not compile. pip cannot install it either, but the latest version on git does compile and install, though I've had trouble with it installed that way (see #26).

KP commented Mar 16, 2012

Here is a complete install log (sorry it's so long) from a Mac with 10.7. I think it's an issue with the compiler that ships with 10.7.

running install
running bdist_egg
running egg_info
creating kartograph.py.egg-info
writing requirements to kartograph.py.egg-info/requires.txt
writing kartograph.py.egg-info/PKG-INFO
writing namespace_packages to kartograph.py.egg-info/namespace_packages.txt
writing top-level names to kartograph.py.egg-info/top_level.txt
writing dependency_links to kartograph.py.egg-info/dependency_links.txt
writing entry points to kartograph.py.egg-info/entry_points.txt
writing manifest file 'kartograph.py.egg-info/SOURCES.txt'
reading manifest file 'kartograph.py.egg-info/SOURCES.txt'
writing manifest file 'kartograph.py.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.7-intel/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/kartograph
copying kartograph/__init__.py -> build/lib/kartograph
copying kartograph/cartogram.py -> build/lib/kartograph
copying kartograph/cli.py -> build/lib/kartograph
copying kartograph/errors.py -> build/lib/kartograph
copying kartograph/filter.py -> build/lib/kartograph
copying kartograph/kartograph.py -> build/lib/kartograph
copying kartograph/options.py -> build/lib/kartograph
copying kartograph/svg.py -> build/lib/kartograph
creating build/lib/kartograph/geometry
copying kartograph/geometry/__init__.py -> build/lib/kartograph/geometry
copying kartograph/geometry/bbox.py -> build/lib/kartograph/geometry
copying kartograph/geometry/feature.py -> build/lib/kartograph/geometry
copying kartograph/geometry/geometry.py -> build/lib/kartograph/geometry
copying kartograph/geometry/line.py -> build/lib/kartograph/geometry
copying kartograph/geometry/point.py -> build/lib/kartograph/geometry
copying kartograph/geometry/polygon.py -> build/lib/kartograph/geometry
copying kartograph/geometry/utils.py -> build/lib/kartograph/geometry
copying kartograph/geometry/view.py -> build/lib/kartograph/geometry
creating build/lib/kartograph/layersource
copying kartograph/layersource/__init__.py -> build/lib/kartograph/layersource
copying kartograph/layersource/layersource.py -> build/lib/kartograph/layersource
copying kartograph/layersource/shplayer.py -> build/lib/kartograph/layersource
creating build/lib/kartograph/proj
copying kartograph/proj/__init__.py -> build/lib/kartograph/proj
copying kartograph/proj/azimuthal.py -> build/lib/kartograph/proj
copying kartograph/proj/base.py -> build/lib/kartograph/proj
copying kartograph/proj/conic.py -> build/lib/kartograph/proj
copying kartograph/proj/cylindrical.py -> build/lib/kartograph/proj
copying kartograph/proj/pseudocylindrical.py -> build/lib/kartograph/proj
creating build/lib/kartograph/simplify
copying kartograph/simplify/__init__.py -> build/lib/kartograph/simplify
copying kartograph/simplify/distance.py -> build/lib/kartograph/simplify
copying kartograph/simplify/mpoint.py -> build/lib/kartograph/simplify
copying kartograph/simplify/unify.py -> build/lib/kartograph/simplify
creating build/lib/kartograph/layersource/special
copying kartograph/layersource/special/__init__.py -> build/lib/kartograph/layersource/special
copying kartograph/layersource/special/graticule.py -> build/lib/kartograph/layersource/special
copying kartograph/layersource/special/sea.py -> build/lib/kartograph/layersource/special
creating build/bdist.macosx-10.7-intel
creating build/bdist.macosx-10.7-intel/egg
creating build/bdist.macosx-10.7-intel/egg/kartograph
copying build/lib/kartograph/__init__.py -> build/bdist.macosx-10.7-intel/egg/kartograph
copying build/lib/kartograph/cartogram.py -> build/bdist.macosx-10.7-intel/egg/kartograph
copying build/lib/kartograph/cli.py -> build/bdist.macosx-10.7-intel/egg/kartograph
copying build/lib/kartograph/errors.py -> build/bdist.macosx-10.7-intel/egg/kartograph
copying build/lib/kartograph/filter.py -> build/bdist.macosx-10.7-intel/egg/kartograph
creating build/bdist.macosx-10.7-intel/egg/kartograph/geometry
copying build/lib/kartograph/geometry/__init__.py -> build/bdist.macosx-10.7-intel/egg/kartograph/geometry
copying build/lib/kartograph/geometry/bbox.py -> build/bdist.macosx-10.7-intel/egg/kartograph/geometry
copying build/lib/kartograph/geometry/feature.py -> build/bdist.macosx-10.7-intel/egg/kartograph/geometry
copying build/lib/kartograph/geometry/geometry.py -> build/bdist.macosx-10.7-intel/egg/kartograph/geometry
copying build/lib/kartograph/geometry/line.py -> build/bdist.macosx-10.7-intel/egg/kartograph/geometry
copying build/lib/kartograph/geometry/point.py -> build/bdist.macosx-10.7-intel/egg/kartograph/geometry
copying build/lib/kartograph/geometry/polygon.py -> build/bdist.macosx-10.7-intel/egg/kartograph/geometry
copying build/lib/kartograph/geometry/utils.py -> build/bdist.macosx-10.7-intel/egg/kartograph/geometry
copying build/lib/kartograph/geometry/view.py -> build/bdist.macosx-10.7-intel/egg/kartograph/geometry
copying build/lib/kartograph/kartograph.py -> build/bdist.macosx-10.7-intel/egg/kartograph
creating build/bdist.macosx-10.7-intel/egg/kartograph/layersource
copying build/lib/kartograph/layersource/__init__.py -> build/bdist.macosx-10.7-intel/egg/kartograph/layersource
copying build/lib/kartograph/layersource/layersource.py -> build/bdist.macosx-10.7-intel/egg/kartograph/layersource
copying build/lib/kartograph/layersource/shplayer.py -> build/bdist.macosx-10.7-intel/egg/kartograph/layersource
creating build/bdist.macosx-10.7-intel/egg/kartograph/layersource/special
copying build/lib/kartograph/layersource/special/__init__.py -> build/bdist.macosx-10.7-intel/egg/kartograph/layersource/special
copying build/lib/kartograph/layersource/special/graticule.py -> build/bdist.macosx-10.7-intel/egg/kartograph/layersource/special
copying build/lib/kartograph/layersource/special/sea.py -> build/bdist.macosx-10.7-intel/egg/kartograph/layersource/special
copying build/lib/kartograph/options.py -> build/bdist.macosx-10.7-intel/egg/kartograph
creating build/bdist.macosx-10.7-intel/egg/kartograph/proj
copying build/lib/kartograph/proj/__init__.py -> build/bdist.macosx-10.7-intel/egg/kartograph/proj
copying build/lib/kartograph/proj/azimuthal.py -> build/bdist.macosx-10.7-intel/egg/kartograph/proj
copying build/lib/kartograph/proj/base.py -> build/bdist.macosx-10.7-intel/egg/kartograph/proj
copying build/lib/kartograph/proj/conic.py -> build/bdist.macosx-10.7-intel/egg/kartograph/proj
copying build/lib/kartograph/proj/cylindrical.py -> build/bdist.macosx-10.7-intel/egg/kartograph/proj
copying build/lib/kartograph/proj/pseudocylindrical.py -> build/bdist.macosx-10.7-intel/egg/kartograph/proj
creating build/bdist.macosx-10.7-intel/egg/kartograph/simplify
copying build/lib/kartograph/simplify/__init__.py -> build/bdist.macosx-10.7-intel/egg/kartograph/simplify
copying build/lib/kartograph/simplify/distance.py -> build/bdist.macosx-10.7-intel/egg/kartograph/simplify
copying build/lib/kartograph/simplify/mpoint.py -> build/bdist.macosx-10.7-intel/egg/kartograph/simplify
copying build/lib/kartograph/simplify/unify.py -> build/bdist.macosx-10.7-intel/egg/kartograph/simplify
copying build/lib/kartograph/svg.py -> build/bdist.macosx-10.7-intel/egg/kartograph
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/cartogram.py to cartogram.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/cli.py to cli.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/errors.py to errors.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/filter.py to filter.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/geometry/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/geometry/bbox.py to bbox.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/geometry/feature.py to feature.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/geometry/geometry.py to geometry.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/geometry/line.py to line.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/geometry/point.py to point.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/geometry/polygon.py to polygon.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/geometry/utils.py to utils.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/geometry/view.py to view.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/kartograph.py to kartograph.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/layersource/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/layersource/layersource.py to layersource.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/layersource/shplayer.py to shplayer.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/layersource/special/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/layersource/special/graticule.py to graticule.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/layersource/special/sea.py to sea.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/options.py to options.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/proj/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/proj/azimuthal.py to azimuthal.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/proj/base.py to base.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/proj/conic.py to conic.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/proj/cylindrical.py to cylindrical.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/proj/pseudocylindrical.py to pseudocylindrical.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/simplify/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/simplify/distance.py to distance.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/simplify/mpoint.py to mpoint.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/simplify/unify.py to unify.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/kartograph/svg.py to svg.pyc
creating build/bdist.macosx-10.7-intel/egg/EGG-INFO
copying kartograph.py.egg-info/PKG-INFO -> build/bdist.macosx-10.7-intel/egg/EGG-INFO
copying kartograph.py.egg-info/SOURCES.txt -> build/bdist.macosx-10.7-intel/egg/EGG-INFO
copying kartograph.py.egg-info/dependency_links.txt -> build/bdist.macosx-10.7-intel/egg/EGG-INFO
copying kartograph.py.egg-info/entry_points.txt -> build/bdist.macosx-10.7-intel/egg/EGG-INFO
copying kartograph.py.egg-info/namespace_packages.txt -> build/bdist.macosx-10.7-intel/egg/EGG-INFO
copying kartograph.py.egg-info/not-zip-safe -> build/bdist.macosx-10.7-intel/egg/EGG-INFO
copying kartograph.py.egg-info/requires.txt -> build/bdist.macosx-10.7-intel/egg/EGG-INFO
copying kartograph.py.egg-info/top_level.txt -> build/bdist.macosx-10.7-intel/egg/EGG-INFO
creating dist
creating 'dist/kartograph.py-0.1.2-py2.7.egg' and adding 'build/bdist.macosx-10.7-intel/egg' to it
removing 'build/bdist.macosx-10.7-intel/egg' (and everything under it)
Processing kartograph.py-0.1.2-py2.7.egg
creating /Library/Python/2.7/site-packages/kartograph.py-0.1.2-py2.7.egg
Extracting kartograph.py-0.1.2-py2.7.egg to /Library/Python/2.7/site-packages
Adding kartograph.py 0.1.2 to easy-install.pth file
Installing kartograph script to /usr/local/bin

Installed /Library/Python/2.7/site-packages/kartograph.py-0.1.2-py2.7.egg
Processing dependencies for kartograph.py==0.1.2
Searching for pyyaml
Reading http://pypi.python.org/simple/pyyaml/
Reading http://pyyaml.org/wiki/PyYAML
Best match: PyYAML 3.10
Downloading http://pyyaml.org/download/pyyaml/PyYAML-3.10.zip
Processing PyYAML-3.10.zip
Running PyYAML-3.10/setup.py -q bdist_egg --dist-dir /tmp/easy_install-SKdwpY/PyYAML-3.10/egg-dist-tmp-cPO7r4
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:2:18: error: yaml.h: No such file or directory
build/temp.macosx-10.7-intel-2.7/check_libyaml.c: In function ‘main’:
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:5: error: ‘yaml_parser_t’ undeclared (first use in this function)
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:5: error: (Each undeclared identifier is reported only once
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:5: error: for each function it appears in.)
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:5: error: expected ‘;’ before ‘parser’
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:6: error: ‘yaml_emitter_t’ undeclared (first use in this function)
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:6: error: expected ‘;’ before ‘emitter’
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:8: warning: implicit declaration of function ‘yaml_parser_initialize’
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:8: error: ‘parser’ undeclared (first use in this function)
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:9: warning: implicit declaration of function ‘yaml_parser_delete’
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:11: warning: implicit declaration of function ‘yaml_emitter_initialize’
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:11: error: ‘emitter’ undeclared (first use in this function)
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:12: warning: implicit declaration of function ‘yaml_emitter_delete’
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:2:18: error: yaml.h: No such file or directory
build/temp.macosx-10.7-intel-2.7/check_libyaml.c: In function ‘main’:
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:5: error: ‘yaml_parser_t’ undeclared (first use in this function)
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:5: error: (Each undeclared identifier is reported only once
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:5: error: for each function it appears in.)
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:5: error: expected ‘;’ before ‘parser’
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:6: error: ‘yaml_emitter_t’ undeclared (first use in this function)
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:6: error: expected ‘;’ before ‘emitter’
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:8: warning: implicit declaration of function ‘yaml_parser_initialize’
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:8: error: ‘parser’ undeclared (first use in this function)
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:9: warning: implicit declaration of function ‘yaml_parser_delete’
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:11: warning: implicit declaration of function ‘yaml_emitter_initialize’
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:11: error: ‘emitter’ undeclared (first use in this function)
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:12: warning: implicit declaration of function ‘yaml_emitter_delete’
lipo: can't open input file: /var/tmp//ccI9bG0t.out (No such file or directory)

libyaml is not found or a compiler error: forcing --without-libyaml
(if libyaml is installed correctly, you may need to
specify the option --include-dirs or uncomment and
modify the parameter include_dirs in setup.cfg)
zip_safe flag not set; analyzing archive contents...
Adding PyYAML 3.10 to easy-install.pth file

Installed /Library/Python/2.7/site-packages/PyYAML-3.10-py2.7-macosx-10.7-intel.egg
Searching for polygon
Reading http://pypi.python.org/simple/polygon/
Reading http://polygon.origo.ethz.ch/
Reading http://polygon.origo.ethz.ch/download
Reading http://www.j-raedler.de/projects/polygon
Reading https://github.com/jraedler/Polygon3/downloads
Reading https://github.com/jraedler/Polygon2/downloads
Best match: Polygon 3.0.4a-src
Downloading https://github.com/downloads/jraedler/Polygon3/Polygon-3.0.4a-src.zip
Processing Polygon-3.0.4a-src.zip
Running Polygon-3.0.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-sHIlN0/Polygon-3.0.4/egg-dist-tmp-5Q7_45
src/cPolygon.c: In function ‘Polygon_dealloc’:
src/cPolygon.c:151: error: ‘Polygon’ has no member named ‘ob_base’
src/cPolygon.c: In function ‘Polygon_covers’:
src/cPolygon.c:928: error: ‘Polygon’ has no member named ‘ob_base’
src/cPolygon.c: In function ‘Polygon_overlaps’:
src/cPolygon.c:960: error: ‘Polygon’ has no member named ‘ob_base’
src/cPolygon.c: In function ‘Polygon_opDiff’:
src/cPolygon.c:1157: error: ‘Polygon’ has no member named ‘ob_base’
src/cPolygon.c: In function ‘Polygon_opUnion’:
src/cPolygon.c:1166: error: ‘Polygon’ has no member named ‘ob_base’
src/cPolygon.c: In function ‘Polygon_opXor’:
src/cPolygon.c:1175: error: ‘Polygon’ has no member named ‘ob_base’
src/cPolygon.c: In function ‘Polygon_opInt’:
src/cPolygon.c:1184: error: ‘Polygon’ has no member named ‘ob_base’
src/cPolygon.c: At top level:
src/cPolygon.c:1201: warning: initialization from incompatible pointer type
src/cPolygon.c:1218: warning: initialization from incompatible pointer type
src/cPolygon.c:1221: warning: initialization from incompatible pointer type
src/cPolygon.c:1355: error: variable ‘cPolygonModule’ has initializer but incomplete type
src/cPolygon.c:1356: error: ‘PyModuleDef_HEAD_INIT’ undeclared here (not in a function)
src/cPolygon.c:1356: warning: excess elements in struct initializer
src/cPolygon.c:1356: warning: (near initialization for ‘cPolygonModule’)
src/cPolygon.c:1357: warning: excess elements in struct initializer
src/cPolygon.c:1357: warning: (near initialization for ‘cPolygonModule’)
src/cPolygon.c:1358: warning: excess elements in struct initializer
src/cPolygon.c:1358: warning: (near initialization for ‘cPolygonModule’)
src/cPolygon.c:1359: warning: excess elements in struct initializer
src/cPolygon.c:1359: warning: (near initialization for ‘cPolygonModule’)
src/cPolygon.c:1361: warning: excess elements in struct initializer
src/cPolygon.c:1361: warning: (near initialization for ‘cPolygonModule’)
src/cPolygon.c: In function ‘PyInit_cPolygon’:
src/cPolygon.c:1365: warning: ‘return’ with a value, in function returning void
src/cPolygon.c:1366: warning: implicit declaration of function ‘PyModule_Create’
src/cPolygon.c:1366: warning: assignment makes pointer from integer without a cast
src/cPolygon.c:1368: warning: ‘return’ with a value, in function returning void
src/cPolygon.c:1388: warning: ‘return’ with a value, in function returning void
src/cPolygon.c: In function ‘Polygon_dealloc’:
src/cPolygon.c:151: error: ‘Polygon’ has no member named ‘ob_base’
src/cPolygon.c: In function ‘Polygon_addContour’:
src/cPolygon.c:242: warning: implicit conversion shortens 64-bit value into a 32-bit value
src/cPolygon.c: In function ‘Polygon_covers’:
src/cPolygon.c:928: error: ‘Polygon’ has no member named ‘ob_base’
src/cPolygon.c: In function ‘Polygon_overlaps’:
src/cPolygon.c:960: error: ‘Polygon’ has no member named ‘ob_base’
src/cPolygon.c: In function ‘Polygon_opDiff’:
src/cPolygon.c:1157: error: ‘Polygon’ has no member named ‘ob_base’
src/cPolygon.c: In function ‘Polygon_opUnion’:
src/cPolygon.c:1166: error: ‘Polygon’ has no member named ‘ob_base’
src/cPolygon.c: In function ‘Polygon_opXor’:
src/cPolygon.c:1175: error: ‘Polygon’ has no member named ‘ob_base’
src/cPolygon.c: In function ‘Polygon_opInt’:
src/cPolygon.c:1184: error: ‘Polygon’ has no member named ‘ob_base’
src/cPolygon.c: At top level:
src/cPolygon.c:1201: warning: initialization from incompatible pointer type
src/cPolygon.c:1218: warning: initialization from incompatible pointer type
src/cPolygon.c:1221: warning: initialization from incompatible pointer type
src/cPolygon.c: In function ‘setDataStyle’:
src/cPolygon.c:1314: warning: implicit conversion shortens 64-bit value into a 32-bit value
src/cPolygon.c: At top level:
src/cPolygon.c:1355: error: variable ‘cPolygonModule’ has initializer but incomplete type
src/cPolygon.c:1356: error: ‘PyModuleDef_HEAD_INIT’ undeclared here (not in a function)
src/cPolygon.c:1356: warning: excess elements in struct initializer
src/cPolygon.c:1356: warning: (near initialization for ‘cPolygonModule’)
src/cPolygon.c:1357: warning: excess elements in struct initializer
src/cPolygon.c:1357: warning: (near initialization for ‘cPolygonModule’)
src/cPolygon.c:1358: warning: excess elements in struct initializer
src/cPolygon.c:1358: warning: (near initialization for ‘cPolygonModule’)
src/cPolygon.c:1359: warning: excess elements in struct initializer
src/cPolygon.c:1359: warning: (near initialization for ‘cPolygonModule’)
src/cPolygon.c:1361: warning: excess elements in struct initializer
src/cPolygon.c:1361: warning: (near initialization for ‘cPolygonModule’)
src/cPolygon.c: In function ‘PyInit_cPolygon’:
src/cPolygon.c:1365: warning: ‘return’ with a value, in function returning void
src/cPolygon.c:1366: warning: implicit declaration of function ‘PyModule_Create’
src/cPolygon.c:1366: warning: assignment makes pointer from integer without a cast
src/cPolygon.c:1368: warning: ‘return’ with a value, in function returning void
src/cPolygon.c:1388: warning: ‘return’ with a value, in function returning void
lipo: can't open input file: /var/tmp//ccIXfLdi.out (No such file or directory)
error: Setup script exited with error: command 'llvm-gcc-4.2' failed with exit status 1

Following with interest... a lot of interest! Hoping I'll be able to make it work someday!

bezeek commented Jul 31, 2012

I succeeded in installing on Windows by adding EZ_Setup to setup.py, creating a distutils.cfg as above, then doing a manual installation of MinGW gcc 3.4.5.

I generally chose old versions of each required package, (released between 2008-2010,) and did not install gomp, ssp, and quadmath. Extracting each archive to C:\MinGW and adding C:\MinGW\bin to %PATH% did the trick.

EZ_Setup: http://peak.telecommunity.com/dist/ez_setup.py
MinGW manual installation instructions: http://www.mingw.org/wiki/InstallationHOWTOforMinGW/

This isn't working for me on Ubuntu 12.04.

I follow the readme.md and get...
$ virtualenv venv
$ . venv/bin/activate
(venv)$ python setup.py install
(bunch of stuff, no errors...)
Processing dependencies for kartograph.py==0.6.2
Finished processing dependencies for kartograph.py==0.6.2

(venv)$ kartograph config.json --preview
...
ImportError: No module named shapely.geometry

(venv)$ pip install shapely
...

Successfully installed shapely
Cleaning up...

(venv)$ kartograph config.json --preview
...
import pyproj
ImportError: No module named pyproj

(venv)$ pip install pyproj
...
Successfully installed pyproj
Cleaning up...

(venv)$ kartograph config.json --preview
...
import tinycss
ImportError: No module named tinycss

(venv)$ pip install tinycss
...
Successfully installed tinycss
Cleaning up...

(venv)$ kartograph config.json --preview
...
from osgeo.osr import SpatialReference
ImportError: No module named osgeo.osr

(venv)$ pip install osgeo
Downloading/unpacking osgeo
Could not find any downloads that satisfy the requirement osgeo
No distributions at all found for osgeo

(venv)$ pip install gdal
Command python setup.py egg_info failed with error code 1 in /home/user/dir/kartograph.py/venv/build/gdal

pip install osgeo yields --> "Could not find any downloads that satisfy the requirement osgeo"

Because Kartograph relies on osgeo there is no easy way for me to try out kartograph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment