Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix Windows & Python 3.x building

  • Loading branch information...
commit 54f051903612563f8d5a05f21d41e194fc01d17d 1 parent b0f8be8
Runar Tenfjord authored
Showing with 24 additions and 9 deletions.
  1. +4 −0 Makefile
  2. +15 −3 README.rst
  3. +5 −5 setup_build.py
  4. +0 −1  setup_docs.py
View
4 Makefile
@@ -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
View
18 README.rst
@@ -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
View
10 setup_build.py
@@ -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
View
1  setup_docs.py
@@ -11,7 +11,6 @@
cmdclass = {'build_sphinx': BuildDoc}
name = 'geotools'
-version = '0.1'
release = '0.1.0'
try:
Please sign in to comment.
Something went wrong with that request. Please try again.