FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Various changes to achieve build status · PibeG/python-mander@fd12997 · GitHub

Commit fd12997

Browse files
committed
Various changes to achieve build status
1 parent 31da961 commit fd12997

4 files changed

Lines changed: 12 additions & 10 deletions

File tree

‎lib/compactnesslib‎

‎mander/__init__.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from _mander import *

‎setup.py‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
from setuptools import setup, Extension
1+
import setuptools
22
#from distutils.core import setup, Extension
33
import glob
44

55
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/'],
1010
language = 'c++',
11-
extra_compile_args = ['-std=c++17'],
11+
extra_compile_args = ['-std=c++11'],
1212
define_macros = [('DOCTEST_CONFIG_DISABLE',None)]
1313
)
1414
]
1515

16-
setup(name='mander',
16+
setuptools.setup(name='mander',
1717
version = '0.1',
1818
description = 'Python package to calculate compactness metrics for district shapes.',
1919
url = 'http://github.com/gerrymandr/python-mander',
2020
author = 'Geometry of Redistricting Workshop',
2121
author_email = '',
2222
license = 'MIT',
23+
packages = setuptools.find_packages(),
2324
ext_modules = ext_modules
2425
)

‎src/pywrapper.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ std::string ProcessGeoJSON(const std::string &geojson, const std::string id){
1515
}
1616

1717

18-
PYBIND11_PLUGIN(compactnesslib) {
19-
py::module m("compactnesslib", "Gerrymandering score calculator");
18+
PYBIND11_PLUGIN(_mander) {
19+
py::module m("_mander", "Compactness calculator");
2020

2121
m.def(
2222
"ProcessGeoJSON",

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL