aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2015-01-05 09:03:05 +0100
committerMatěj Cepl <mcepl@cepl.eu>2015-01-05 12:59:40 +0100
commitd17b009ffec3077bf8db6e6902a7456ec90e9c38 (patch)
tree2a5ee305bd8c8a39faf7c2db342d399c689ae432 /setup.py
parenta9e311030533ac6c175e2289e8928e4aae98b6c3 (diff)
downloadpygn-d17b009ffec3077bf8db6e6902a7456ec90e9c38.tar.gz
First draft of the pure Python parser done, we should be noarch.
Fixes #2
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py37
1 files changed, 2 insertions, 35 deletions
diff --git a/setup.py b/setup.py
index e74d78a..d370040 100644
--- a/setup.py
+++ b/setup.py
@@ -1,42 +1,15 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
+
+from mail2news import VERSION, DESC
import os.path
from setuptools import setup
-from distutils.core import Extension
-from distutils.command.build_ext import build_ext
-from subprocess import check_call
-from mail2news import VERSION, DESC
-
-
-class Build_WLP_ext(build_ext):
- def run(self):
- self.make_file(
- 'wlp/commands.y', 'wlp/commands.tab.c', check_call,
- # Yes, the following line contains list-in-list-in-tuple, and
- # that's how it should be.
- # otherwise, subsequent calls down the stack unwind the list and
- # check_call won't get it.
- ([['yacc', '-d', '-o', 'wlp_c/commands.tab.c',
- 'wlp_c/commands.y']]),
- 'Generating lexer')
- self.make_file(
- 'wlp/commands.l', 'wlp/lex.yy.c', check_call,
- ([['lex', '-o', 'wlp/lex.yy.c', 'wlp/commands.l']]),
- 'Generating parser')
- build_ext.run(self)
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
-# see https://github.com/Turbo87/py-xcsoar/blob/master/setup.py
-wlp_module = Extension('wlp',
- sources=['wlp/wlp.c',
- 'wlp/structs.c',
- 'wlp/commands.tab.c',
- 'wlp/lex.yy.c'])
-
setup(name='pygn',
version=VERSION, # the current Debian version is 0.9.8
@@ -46,14 +19,8 @@ setup(name='pygn',
long_description=read('README'),
url='https://gitlab.com/mcepl/pyg',
py_modules=['mail2news', 'news2mail', 'setup', 'whitelist'],
- ext_modules=[wlp_module],
test_suite="test",
scripts=['pygm2n', 'pygn2m'],
- cmdclass={
- 'build_ext': Build_WLP_ext
- },
- # TODO package actually requires lex and yacc port, but not sure
- # how to say it here
requires=['rply'],
license="GPLv3",
keywords=["nntp", "email", "gateway"],