Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
Fix Windows & Python 3.x building
Browse files Browse the repository at this point in the history
  • Loading branch information
Runar Tenfjord committed Nov 23, 2012
1 parent b0f8be8 commit 54f0519
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
4 changes: 4 additions & 0 deletions Makefile
Expand Up @@ -25,6 +25,10 @@ tests: all
install: all
@cp geotools.so ~/.local/lib/python$(PYVER)/site-packages/
@cp geotools/geotools.pxd ~/.local/lib/python$(PYVER)/site-packages/

sdist: clean
@echo lib Makefile - creating source distribution
$(PYTHON) setup_build.py sdist --formats=gztar,zip

clean:
-rm -rf build dist
Expand Down
18 changes: 15 additions & 3 deletions README.rst
Expand Up @@ -16,13 +16,25 @@ The license is GPL v2.
Building
========

* Python 2.6 or later and Cython 0.17.
* Python 2.7/3.x or later and Cython 0.17 or later.

The extension have only been build on the Linux platform.
Note that currently I can not find a way to install the required
Cython 'pxd' files with distutils and this file has to be copied
manually.

Prebuild installers are available on the pypi_ site
for the Windows platform.

Note that currently to be able to build the module on
Python 3.x the source must be patched. The '__div__'
member must be renamed to '__truediv__' and similar
for '__idiv__'.

Documentation
=============

See online Sphinx docs_

.. _docs: http://tenko.github.com/geotools/index.html
.. _docs: http://tenko.github.com/geotools/index.html

.. _pypi: http://pypi.python.org/pypi/geotools
10 changes: 5 additions & 5 deletions setup_build.py
Expand Up @@ -16,21 +16,21 @@
print >>sys.stderr, "Cython is required to build geotools"
sys.exit(1)

#sys.argv.append('build_ext')
#sys.argv.extend(['sdist','--formats=gztar,zip'])
#sys.argv.append('bdist_wininst')

# create config file
sys.dont_write_bytecode = True
import version

CONFIG = 'geotools/@src/Config.pxi'
if not os.path.exists(CONFIG):
if not os.path.exists(CONFIG) and 'sdist' not in sys.argv:
with open(CONFIG, 'w') as fh:
fh.write("__version__ = '%s'\n" % version.STRING)
args = version.MAJOR, version.MINOR, version.BUILD
fh.write("__version_info__ = (%d,%d,%d)\n" % args)

#sys.argv.append('build_ext')
#sys.argv.extend(['sdist','--formats=gztar,zip'])
sys.argv.append('bdist_wininst')

classifiers = '''\
Development Status :: 5 - Production/Stable
Environment :: Console
Expand Down
1 change: 0 additions & 1 deletion setup_docs.py
Expand Up @@ -11,7 +11,6 @@
cmdclass = {'build_sphinx': BuildDoc}

name = 'geotools'
version = '0.1'
release = '0.1.0'

try:
Expand Down

0 comments on commit 54f0519

Please sign in to comment.