| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + from _mander import * | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,24 +1,25 @@ | |||
| 1 | - from setuptools import setup, Extension | ||
| 1 | + import setuptools | ||
| 2 | 2 | #from distutils.core import setup, Extension | |
| 3 | 3 | import glob | |
| 4 | 4 | ||
| 5 | 5 | ext_modules = [ | |
| 6 | - Extension( | ||
| 7 | - "compactnesslib", | ||
| 8 | - glob.glob('src/*.cpp') + glob.glob('lib/compactnesslib/src/*.cpp'), | ||
| 9 | - include_dirs = ['lib/compactnesslib/src', 'lib/pybind11/'], | ||
| 6 | + setuptools.Extension( | ||
| 7 | + "_mander", | ||
| 8 | + glob.glob('src/*.cpp') + glob.glob('lib/compactnesslib/*.cpp') + glob.glob('lib/compactnesslib/shapelib/*.c'), | ||
| 9 | + include_dirs = ['lib/compactnesslib', 'lib/pybind11/'], | ||
| 10 | 10 | language = 'c++', | |
| 11 | - extra_compile_args = ['-std=c++17'], | ||
| 11 | + extra_compile_args = ['-std=c++11'], | ||
| 12 | 12 | define_macros = [('DOCTEST_CONFIG_DISABLE',None)] | |
| 13 | 13 | ) | |
| 14 | 14 | ] | |
| 15 | 15 | ||
| 16 | - setup(name='mander', | ||
| 16 | + setuptools.setup(name='mander', | ||
| 17 | 17 | version = '0.1', | |
| 18 | 18 | description = 'Python package to calculate compactness metrics for district shapes.', | |
| 19 | 19 | url = 'http://github.com/gerrymandr/python-mander', | |
| 20 | 20 | author = 'Geometry of Redistricting Workshop', | |
| 21 | 21 | author_email = '', | |
| 22 | 22 | license = 'MIT', | |
| 23 | + packages = setuptools.find_packages(), | ||
| 23 | 24 | ext_modules = ext_modules | |
| 24 | 25 | ) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,8 +15,8 @@ std::string ProcessGeoJSON(const std::string &geojson, const std::string id){ | |||
| 15 | 15 | } | |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | - PYBIND11_PLUGIN(compactnesslib) { | ||
| 19 | - py::module m("compactnesslib", "Gerrymandering score calculator"); | ||
| 18 | + PYBIND11_PLUGIN(_mander) { | ||
| 19 | + py::module m("_mander", "Compactness calculator"); | ||
| 20 | 20 | ||
| 21 | 21 | m.def( | |
| 22 | 22 | "ProcessGeoJSON", | |
| Back | FazBrowse Home | New Git URL |
0 commit comments