[tool.pdm]
version = { source = "file", path = "psychopy/__init__.py" }

[project]
name = "psychopy"
dynamic = ["version"]
requires-python = ">=3.8, <3.11"
description = "PsychoPy provides easy, precise, flexible experiments in behavioural sciences"
readme ={file = "README.md", content-type = "text/markdown"}
authors = [
    {name = "Open Science Tools Ltd", email = "support@opensciencetools.org"},
]
maintainers = [
    {name = "Open Science Tools Ltd", email = "support@opensciencetools.org"},
]
classifiers = [
    "Development Status :: 4 - Beta",
    "Operating System :: MacOS :: MacOS X",
    "Operating System :: Microsoft :: Windows",
    "Operating System :: POSIX :: Linux",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Topic :: Scientific/Engineering",
    "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
    ]
    
dependencies = [
    "numpy",  # use numpy<1.24 for psychopy<2023.1
    "scipy",
    "matplotlib",
    "pyglet == 1.4.11; platform_system == \"Windows\"",
    "pyglet == 1.5.27; platform_system != \"Windows\"",
    "pillow>=9.4.0",
    "pyqt6",
    "pandas>=1.5.3",
    "questplus>=2023.1",
    "openpyxl",
    "xmlschema",
    # for core stimuli
    "soundfile",
    "imageio",
    "imageio-ffmpeg",
    "psychtoolbox",
    # for iohub
    "pywinhook; platform_system == \"Windows\"",
    "gevent",
    "psutil",
    "pyzmq>=22.2.1",
    "ujson",
    "msgpack",
    "msgpack-numpy",
    "pyyaml",
    # for text formatting
    "freetype-py",
    "python-bidi",
    "arabic-reshaper",
    "javascripthon",
    "websockets",  # new in 2023.2 for session.py
    # for the app
    "wxPython >= 4.1.1",
    "markdown-it-py",
    "requests",
    "future",  # only to support legacy versions in useVersion
    # supporting plugins
    "pypi-search>=1.2.1",
    "setuptools<=66.1.1",
    # pavlovia connections
    "python-gitlab",
    "gitpython",
    "cryptography",  # for sshkeys
    # psychoJS conversions
    "javascripthon>=0.12",
    "astunparse",
    "esprima",
    "jedi >= 0.16",
    # hardware
    "pyserial",
    "pyparallel; platform_system != \"Darwin\"",
    # movie backends
    "ffpyplayer",
    "opencv-python",
    # platform specific
    "python-vlc == 3.0.11115; platform_system == \"Windows\"",
    "python-vlc >= 3.0.12118; platform_system != \"Windows\"",
    "pypiwin32; platform_system == \"Windows\"",
    "pyobjc-core; platform_system == \"Darwin\"",
    "pyobjc-framework-Quartz < 8.0; platform_system == \"Darwin\"",
    "pyobjc; platform_system == \"Darwin\"",
    "python-xlib; platform_system == \"Linux\"",
    'tables<3.9; python_version < "3.9"',
    'tables; python_version >= "3.9"',
    'blosc2<2.2.8; python_version < "3.9"',  # dependency of tables
]

[project.optional-dependencies]  # This is optional dependencies
tests = [
    "pytest>=6.2.5",
    "pytest-codecov",
    "pytest-cov",
    "pytest-asyncio",
    "flake8",
    "xmlschema",
]
building = [
    "bdist-mpkg>=0.5.0; platform_system == \"Darwin\"",
    "py2app; platform_system == \"Darwin\"",
    "dmgbuild; platform_system == \"Darwin\"",
]
suggested = [
    "pylsl>=1.16.1", # lab streaming layer for general connectivity
    "xlwt",  # writing excel fiels with pandas
    "h5py",  # to read hdf5 files for analysis
    "SpeechRecognition",
    "google-api-python-client",
    "pygaze>=1.1.2",
    "tobii_research",
    "badapted>=0.0.3",
    "egi-pynetstation>=0.0.0rc1",
    "pyxid2>=1.0.5",
    "Phidget22",
]
legacy = [
    "pyo>=1.0.3",
    "pyglfw",
    "moviepy",
    "pygame",
]

[project.urls]
Homepage = "https://www.psychopy.org/"
Download = "https://github.com/psychopy/psychopy/releases/"

[project.gui-scripts]
psychopy = "psychopy.app.psychopyApp:main"

[build-system]
requires = [
    "pdm-backend",
    "distro; platform_system == \"Linux\"",
    "tomlkit",
    ]
build-backend = "pdm.backend"

[tool.pdm.build]
includes = []
excludes = ["building/"]
#source-includes = ["tests/"]

[tool.distutils.bdist_wheel]
universal = 1

[tool.psychopy]
src = ["psychopy"]
