From bf0330e723b966b5c7e912b0d2153ed1f4d2af2d Mon Sep 17 00:00:00 2001 From: "Way, No" Date: Thu, 16 Apr 2015 23:29:03 +1200 Subject: [PATCH 1/2] added setup.py for pysnip --- setup.cfg | 2 ++ setup.py | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..b88034e4 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[metadata] +description-file = README.md diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..36900e71 --- /dev/null +++ b/setup.py @@ -0,0 +1,51 @@ +import sys +from setuptools import setup, find_packages, Extension +from Cython.Distutils import build_ext +from Cython.Build import cythonize + +ext_modules = [] + +names = [ + 'pyspades.vxl', + 'pyspades.bytes', + 'pyspades.packet', + 'pyspades.contained', + 'pyspades.common', + 'pyspades.world', + 'pyspades.loaders', + 'pyspades.mapmaker' +] + +for name in names: + extra = {'extra_compile_args' : ['-std=c++11']} if name in ['pyspades.vxl', 'pyspades.world', 'pyspades.mapmaker'] else {} + + ext_modules.append(Extension(name, ['%s.pyx' % name.replace('.', '/')], + language = 'c++', include_dirs=['pyspades'], **extra)) + + +setup( + name = 'pysnip', + packages = ['pysnip', 'pyspades', 'pysnip.feature_server'], + version = '0.0.0', + description = 'Open-source server implementation for Ace of Spades', + author = 'Matpow2, Stackoverflow', + author_email = 'nate.shoffner@gmail.com', + url = 'https://github.com/NateShoffner/PySnip', + download_url = 'https://github.com/NateShoffner/PySnip/archive/master.tar.gz', + keywords = ['ace of spades', 'aos', 'server'], + classifiers = [], + setup_requires = ['cython'], + install_requires = ['twisted'], + extras_require = { + 'from': ['pygeoip'], + 'statusserver': ['jinja2', 'pillow'], + 'ssh': ['pycrypto', 'pyasn1'] + }, + entry_points = { + 'console_scripts': [ + 'pysnip=pysnip.feature_server.run:main' + ], + }, + package_dir = {'pysnip': '', 'pyspades': 'pyspades'}, + ext_modules = cythonize(ext_modules) +) From a14ab550980d55fa90f30f861f6109523a7c6364 Mon Sep 17 00:00:00 2001 From: "Way, No" Date: Thu, 16 Apr 2015 23:29:19 +1200 Subject: [PATCH 2/2] __init__ and __main__ files --- __init__.py | 2 ++ feature_server/__main__.py | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 __init__.py create mode 100644 feature_server/__main__.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 00000000..72836b3d --- /dev/null +++ b/__init__.py @@ -0,0 +1,2 @@ + +__all__ = ['pyspades', 'feature_server'] diff --git a/feature_server/__main__.py b/feature_server/__main__.py new file mode 100644 index 00000000..553aaf1c --- /dev/null +++ b/feature_server/__main__.py @@ -0,0 +1,4 @@ +import run + +if __name__ == '__main__': + run.main() \ No newline at end of file