-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
45 lines (40 loc) · 2.08 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
# Define entry points in our package metadata. Keys should be fully qualified
# names of modules or (unbound) classes within PsychoPy (eg.
# 'psychopy.visual.Rect'). Values are used to specify which attributes of those
# objects to create or modify. For instance, our `get_area` function in the
# `psychopy_demo_plugin` module will be assigned as attribute `getArea` in the
# `psychopy.visual.Rect` class. After the plugin is loaded, any instances of
# `Rect` will have that method.
# Define the name for your package, this will be used when calling `loadPlugin`.
# Note, for packages containing only a single module defining objects to export,
# you should name it something based off this name of the project to avoid
# import collisions with other packages, here we call it `psychopy_demo_plugin`.
name = "psychopy-demo-plugin"
# Define entry points. PsychoPy's plugin framework scans packages and looks for
# entry points advertised in the package metadata which pertains to PsychoPy.
# Entry points are a dictionary, where keys are fully qualified names to
# modules and unbound classes which you want to add/modify attributes. Values
# can be single strings, or lists of strings specifying what attributes of those
# PsychoPy objects are to reference objects defined in the plugin module.
entry_points = {
'psychopy.visual.Rect': ['getArea = psychopy_demo_plugin:get_area']}
# Run the setup function.
setup(
name=name, # set the name
version="0.1", # put your plugin version here
packages=['psychopy_demo_plugin'],
package_data={"": ["*.txt", "*.md"]},
author="Nobody",
author_email="[email protected]",
description="PsychoPy plugin to compute the area of a Rect stimuli.",
url="https://github.com/mdcutone/psychopy-demo-plugin",
classifiers=[
"License :: OSI Approved :: MIT",
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3'],
keywords="psychopy stimuli sample",
entry_points=entry_points # set our entry points in the package metadata
)