Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix windows installation #35

Merged
merged 3 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ If you are willing to run `edf2asc` on all your files, you can use:
- Alex Kim
- Greg Schwimer
- Oscar Esteban
- Richard Veale

## Setup

Expand Down
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pyedfread
version = 0.3.0
version = 0.3.1
description = Read SR-Research EDF files.
keywords = psychology, neuroscience
license = BSD-2-Clause
Expand All @@ -14,8 +14,7 @@ install_requires =
numpy
pandas
h5py
package_dir =
= src
package_dir = src
packages = find:

[options.package_data]
Expand Down
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
"""

import sys
from distutils.core import setup
from distutils.extension import Extension
#from distutils.core import setup
#from distutils.extension import Extension
from Cython.Distutils import build_ext
from setuptools import setup,find_packages, Extension
import numpy


Expand Down Expand Up @@ -49,12 +50,14 @@
"extra_link_args": ["-fopenmp"],
}


print(args)
ext_module = Extension("pyedfread.edf_read", ["src/pyedfread/edf_read.pyx"], **args)

ext_data = Extension("pyedfread.edf_data", ["src/pyedfread/edf_data.pyx"], **args)

setup(
cmdclass={'build_ext': build_ext},
ext_modules=[ext_data, ext_module],
packages = find_packages(where='src'),
package_dir = {"": "src"},
)
13 changes: 13 additions & 0 deletions src/pyedfread/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
"""Read eye-tracking information from EyeLink EDF files."""


import sys
if sys.platform.startswith("win32"):
import os
import platform
srr_basedir = r"C:\Program Files (x86)\SR Research\EyeLink"
if platform.architecture()[0] == "64bit":
arch_dir = 'x64'
else:
arch_dir = ''
# due to a change in python 3.8, the searchpath is not automatically added anymore
os.add_dll_directory(os.path.join(srr_basedir, 'libs', arch_dir))

from pyedfread.parse import read_edf
from pyedfread.edf_read import read_preamble, read_messages, read_calibration