Skip to content

Commit

Permalink
possible to install in Widnows
Browse files Browse the repository at this point in the history
  • Loading branch information
arsadri authored and arsadri committed Jul 9, 2023
1 parent b0d0cec commit af2ceea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
3 changes: 2 additions & 1 deletion RobustGaussianFittingLibrary/cWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
import os
import fnmatch

dir_path = os.path.dirname(os.path.realpath(__file__)) + os.path.sep + '..' + os.path.sep
dir_path = os.path.dirname(
os.path.realpath(__file__)) + os.path.sep + '..' + os.path.sep
fileNameTemplate = 'RGFLib*.so'
flist = fnmatch.filter(os.listdir(dir_path + os.path.sep), fileNameTemplate)
if(len(flist)==0): #for those who use make
Expand Down
22 changes: 15 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

from setuptools import setup
from setuptools import Extension

_version = '0.2.3'
from platform import system as platform_system
_version = '0.2.4'

with open('README.md') as readme_file:
readme = readme_file.read()
Expand All @@ -23,6 +23,17 @@

test_requirements = ['pytest>=3', ]

more_setup_arguments = {}
if platform_system() == 'Linux':
more_setup_arguments['ext_modules'] = [
Extension(name = 'RGFLib',
sources = ['RobustGaussianFittingLibrary/RGFLib.c'],
language = 'c',
extra_compile_args = ['-shared'])]
else:
more_setup_arguments['package_data']=\
{'': ['RobustGaussianFittingLibrary/RGFLib.so']}

setup(
author="Alireza Sadri",
author_email='[email protected]',
Expand Down Expand Up @@ -63,8 +74,5 @@
url='https://github.com/arsadri/RobustGaussianFittingLibrary',
version=_version,
zip_safe=False,
ext_modules=[Extension(name = 'RGFLib',
sources = ['RobustGaussianFittingLibrary/RGFLib.c'],
language = 'c',
extra_compile_args = ['-shared'])],
)
**more_setup_arguments
)

0 comments on commit af2ceea

Please sign in to comment.