-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
59 lines (51 loc) · 1.92 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from setuptools import setup, Extension
from Cython.Build import cythonize
import numpy
import os
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
with open(f"{SCRIPT_DIR}/requirements.txt", "r") as f:
dependencies = f.read().split('\n')
setup(
name='NES Emulator',
version="1.0",
author="Michael Deimetry",
author_email="mdeimetry@gmail.com",
description="NES Emulator written in Cython.",
package_dir={'cy_NES_Emulator': ''},
include_dirs=[numpy.get_include()],
ext_modules=cythonize([
'CPU6502.pyx',
'Bus.pyx',
'PPU.pyx',
'APU.pyx',
'Cartridge.pyx',
'NES.pyx',
]),
install_requires=dependencies,
)
# from setuptools import setup
# from Cython.Build import cythonize
# import numpy
# from setuptools.extension import Extension
# from Cython.Compiler.Options import get_directive_defaults
# directive_defaults = get_directive_defaults()
# directive_defaults['linetrace'] = True
# directive_defaults['binding'] = True
# # Create Extension objects for each Cython module
# extensions = [
# Extension(name="CPU6502", sources=["CPU6502.pyx"], define_macros=[('CYTHON_TRACE', '1')]),
# Extension(name="Bus", sources=["Bus.pyx"], define_macros=[('CYTHON_TRACE', '1')]),
# Extension(name="PPU", sources=["PPU.pyx"], define_macros=[('CYTHON_TRACE', '1')]),
# Extension(name="Cartridge", sources=["Cartridge.pyx"], define_macros=[('CYTHON_TRACE', '1')]),
# Extension(name="NES", sources=["NES.pyx"], define_macros=[('CYTHON_TRACE', '1')]),
# # Extension(name="Mapper", sources=["Mappers/Mapper.pyx"], define_macros=[('CYTHON_TRACE', '1')]),
# # Extension(name="Mapper000", sources=["Mappers/Mapper000.pyx"], define_macros=[('CYTHON_TRACE', '1')]),
# 'Mappers/Mapper.pyx',
# 'Mappers/Mapper000.pyx',
# ]
# setup(
# name='NES Emulator',
# package_dir={'cy_NES_Emulator': ''},
# include_dirs=[numpy.get_include()],
# ext_modules=cythonize(extensions)
# )