diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | README | 27 | ||||
m--------- | examples/imap2nntp | 0 | ||||
-rw-r--r-- | mail2news.py | 2 | ||||
-rw-r--r-- | setup.py | 55 |
6 files changed, 33 insertions, 56 deletions
@@ -2,3 +2,5 @@ build/ wlp/commands.tab.* wlp/lex.yy.c *.pyc +wlp.so +pyg.egg-info/ diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 5e13664..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "examples/imap2nntp"] - path = examples/imap2nntp - url = https://github.com/jwiegley/imap2nntp.git @@ -1,17 +1,29 @@ -This package was debianized by Cosimo Alfarano <alfarano@students.cs.unibo.it> on Sun, 25 Jun 2000 17:52:35 +0200. - -Current maintainer and author is Cosimo Alfarano. -You can find this package at URL HTTP://www.students.cs.unibo.it/~alfarano +Python Gateway Script from news to mail and vice versa. Copyright: Copyright (C) 2000-2001,2012 Cosimo Alfarano <kalfa@debian.org> +Copyright (C) 2014 Matěj Cepl <mcepl@cepl.eu> A copy of the GNU General Public License, version 2, can be found in /usr/share/common-licenses/GPL-3 +It is intended to be a full SMTP/NNTP rfc compliant gateway +with whitelist manager. + +You will probably have to install a mail-transport-agent and/or +news-transport-system package to manage SMTP/NNTP traffic. + +MTA is needed for mail2news service, since mail have to be +processed on a box where pyg is installed. You can use a remote +smtpserver for news2mail. + +News system is useful but not needed, since you can send articles to a +remote SMTP server (ie: moderated NG) where is installed pyg, otherwise you +will need it. + +It refers to rfc 822 (mail) and 850 (news). -Pyg is a news to mail and mail to news gateway. -It is under devel. +---------------- List of file: @@ -21,6 +33,5 @@ setup.py setup script pygm2n mail to news gateway frontend pygn2m news to mail gateway frontend whitelist.py whitelist managing python class module -wlp_test test script to test yout whitelist file wlp C backend for whitelist parser (wlp) directory -examples documentation and exaples directory +examples documentation and exaples directory
\ No newline at end of file diff --git a/examples/imap2nntp b/examples/imap2nntp deleted file mode 160000 -Subproject 6ab25b9fb41ca5cc214fe4b62d8f2278a602b63 diff --git a/mail2news.py b/mail2news.py index c9ed55f..adce631 100644 --- a/mail2news.py +++ b/mail2news.py @@ -29,7 +29,7 @@ import sys # This is the single source of Truth # Yes, it is awkward to have it assymetrically here # and not in news2mail as well. -VERSION = '0.9.9' +VERSION = '0.9.10' DESC = "The Python Gateway Script: news2mail mail2news gateway" @@ -1,34 +1,14 @@ #!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function -import unittest -import sys -from distutils.core import setup, Extension, Command +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 RunTests(Command): - """New setup.py command to run all tests for the package. - """ - description = "run all tests for the package" - - user_options = [] - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - tests = unittest.TestLoader().discover('.') - runner = unittest.TextTestRunner() - results = runner.run(tests) - sys.exit(not results.wasSuccessful()) - - class Build_WLP_ext(build_ext): def run(self): self.make_file( @@ -45,6 +25,9 @@ class Build_WLP_ext(build_ext): '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', @@ -58,30 +41,14 @@ setup(name='pyg', author="Cosimo Alfarano, Matej Cepl", author_email="kalfa@debian.org, mcepl@cepl.eu", description=DESC, - long_description=''' - Python Gateway Script from news to mail and vice versa. - - It is intended to be a full SMTP/NNTP rfc compliant gateway - with whitelist manager. - - You will probably have to install a mail-transport-agent and/or - news-transport-system package to manage SMTP/NNTP traffic. - - MTA is needed for mail2news service, since mail have to be - processed on a box where pyg is installed. You can use a remote - smtpserver for news2mail. - - News system is useful but not needed, since you can send articles to a - remote SMTP server (ie: moderated NG) where is installed pyg, otherwise you - will need it. - - It refers to rfc 822 (mail) and 850 (news). - ''', + long_description=read('README'), py_modules=['mail2news', 'news2mail', 'setup', 'whitelist'], ext_modules=[wlp_module], + test_suite="test", scripts=['pygm2n', 'pygn2m'], - cmdclass={'build_ext': Build_WLP_ext, - 'test': RunTests}, + cmdclass={ + 'build_ext': Build_WLP_ext + }, # TODO package actually requires lex and yacc port, but not sure # how to say it here requires=[], |