-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
35 lines (33 loc) · 1.2 KB
/
setup.py
File metadata and controls
35 lines (33 loc) · 1.2 KB
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
import os
import sys
import shutil
import subprocess
from setuptools import setup
from setuptools.command.build import build
class BuildZig(build):
def run(self):
build.run(self)
subprocess.check_call([sys.executable, '-m', 'ziglang', 'build', '-Doptimize=ReleaseFast'])
source_dir = os.path.abspath('zig-out')
lib_dir = os.path.join(self.build_lib, 'zig-out')
if os.path.exists(lib_dir):
shutil.rmtree(lib_dir)
shutil.copytree(source_dir, lib_dir)
setup(
name="zigon",
version="0.0.1a1",
author="J Joe",
author_email="[email protected]",
long_description=open('README.md', encoding='utf-8').read(),
long_description_content_type="text/markdown",
url="https://github.com/JosefAlbers/Zigon",
description="Zigon: Procedural 3D World Builder (formerly Terrain Zigger)",
py_modules=['main'],
install_requires=['ziglang==0.13.0.post1', 'numpy', 'requests'],
cmdclass={'build': BuildZig},
data_files=[
('', ['build.zig', 'build.zig.zon', 'walk.zig', 'terrain.zig', 'object.zig', 'dungeon.zig', 'chat.zig', 'index.html']),
],
entry_points={"console_scripts": ["tzg=main:demo"]},
zip_safe=False,
)