rajanil / fastStructure

A variational framework for inferring population structure from SNP genotype data.
MIT License
134 stars 50 forks source link

package no longer copmiles; setup.py needs to be updated #28

Open akucukelbir opened 8 years ago

akucukelbir commented 8 years ago

each extension now requires its own include_dirs declaration.

for example, the top-level setup.py compiles on my end if i edit it as follows:


from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy
import sys

# setup bed parser
ext_modules = [Extension("parse_bed", ["parse_bed.pyx"], include_dirs=[numpy.get_include(), '.'])]

setup(
    name = 'parse_bed',
    cmdclass = {'build_ext': build_ext},
    ext_modules = ext_modules
)

# setup structure format parser
ext_modules = [Extension("parse_str", ["parse_str.pyx"], include_dirs=[numpy.get_include(), '.'])]

setup(
    name = 'parse_str',
    cmdclass = {'build_ext': build_ext},
    ext_modules = ext_modules
)

# setup fastStructure
ext_modules = [Extension("fastStructure", ["fastStructure.pyx"], include_dirs=[numpy.get_include(), '.'])]

setup(
    name = 'fastStructure',
    cmdclass = {'build_ext': build_ext},
    ext_modules = ext_modules
)
rajanil commented 8 years ago

thanks for letting me know! I'll check this out and update setup.py. Do you know what caused compilation to fail now? An update in a newer distutils package?

akucukelbir commented 8 years ago

i believe something changed in distutils yes. i must admit i'm not that familiar with cython projects; i think the modification above does the trick, but it might not be the "correct" way of doing it :)