# HG changeset patch # User Brian Neal # Date 1338423382 18000 # Node ID 62e0d0e2628b570c39af15eacfd158a1b85f7da3 # Parent f8734f73baa8d431755e94dcd1c763e7c0eb8b3d Created a setup.py using distutils. diff -r f8734f73baa8 -r 62e0d0e2628b MANIFEST.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MANIFEST.in Wed May 30 19:16:22 2012 -0500 @@ -0,0 +1,2 @@ +include *.txt +recursive-include enigma/examples * diff -r f8734f73baa8 -r 62e0d0e2628b README.txt --- a/README.txt Tue May 29 17:30:49 2012 -0500 +++ b/README.txt Wed May 30 19:16:22 2012 -0500 @@ -5,8 +5,8 @@ ------------------------------------------------------------------ :Author: Brian Neal -:Version: 0.1 -:Date: May 28, 2012 +:Version: Alpha +:Date: May 30, 2012 :Home Page: https://bitbucket.org/bgneal/enigma/ :License: MIT License (see LICENSE.txt) :Support: https://bitbucket.org/bgneal/enigma/issues @@ -78,9 +78,9 @@ Assuming you have a proper key file that contains the same initial settings as the code above, the above example can be performed on the command-line:: - $ pyenigma --key-file=keys.txt --start=WXC --text='KCH' + $ pyenigma.py --key-file=keys.txt --start=WXC --text='KCH' BLA - $ pyenigma --key-file=keys.txt --start=BLA --text='NIBLFMYMLLUFWCASCSSNVHAZ' + $ pyenigma.py --key-file=keys.txt --start=BLA --text='NIBLFMYMLLUFWCASCSSNVHAZ' THEXRUSSIANSXAREXCOMINGX The format of the key file can be found in the documentation. @@ -89,7 +89,7 @@ Requirements ------------ -Py-Enigma is written in Python_, specifically Python 3. It has no other +Py-Enigma is written in Python_, specifically Python 3.2. It has no other requirements or dependencies. @@ -111,9 +111,9 @@ $ hg clone https://bitbucket.org/bgneal/enigma -In the very near future I will provide a ``setup.py`` script that will allow you -to install Py-Enigma. For the time being, just place the ``enigma`` directory on -your ``PYTHONPATH``. +Once you have obtained a copy of the source somehow, to install:: + + $ python setup.py install Documentation ------------- diff -r f8734f73baa8 -r 62e0d0e2628b enigma/__init__.py --- a/enigma/__init__.py Tue May 29 17:30:49 2012 -0500 +++ b/enigma/__init__.py Wed May 30 19:16:22 2012 -0500 @@ -11,3 +11,4 @@ For a list of the rotors and reflectors we simulate, see the module rotors.data. """ +__version__ = '0.1' diff -r f8734f73baa8 -r 62e0d0e2628b enigma/main.py --- a/enigma/main.py Tue May 29 17:30:49 2012 -0500 +++ b/enigma/main.py Wed May 30 19:16:22 2012 -0500 @@ -29,9 +29,9 @@ Examples: - $ %(prog)s --key-file=enigma.keys -t HELLOXWORLDX - $ %(prog)s -r III IV V -s 0 1 2 -p AB CD EF GH IJ KL MN -u B - $ %(prog)s -r Beta III IV V -s A B C D -p 1/2 3/4 5/6 -u B-Thin + $ %(prog)s --key-file=enigma.keys -s XYZ -t HELLOXWORLDX + $ %(prog)s -r III IV V -i 0 1 2 -p AB CD EF GH IJ KL MN -u B -s XYZ + $ %(prog)s -r Beta III IV V -i A B C D -p 1/2 3/4 5/6 -u B-Thin -s WXYZ """ diff -r f8734f73baa8 -r 62e0d0e2628b pyenigma.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pyenigma.py Wed May 30 19:16:22 2012 -0500 @@ -0,0 +1,8 @@ +#!/usr/bin/env python +# Copyright (C) 2012 by Brian Neal. +# This file is part of Py-Enigma, the Enigma Machine simulation. +# Py-Enigma is released under the MIT License (see License.txt). + +import enigma.main + +enigma.main.console_main() diff -r f8734f73baa8 -r 62e0d0e2628b setup.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/setup.py Wed May 30 19:16:22 2012 -0500 @@ -0,0 +1,44 @@ +#!/usr/bin/env python +# Copyright (C) 2012 by Brian Neal. +# This file is part of Py-Enigma, the Enigma Machine simulation. +# Py-Enigma is released under the MIT License (see License.txt). + +from distutils.core import setup +from os.path import join, dirname + +import enigma + +setup( + name='enigma', + version=enigma.__version__, + author='Brian Neal', + author_email='bgneal@gmail.com', + url='https://bitbucket.org/bgneal/enigma/', + license='MIT', + description='A historically accurate Enigma machine simulation library.', + long_description=open(join(dirname(__file__), 'README.txt')).read(), + packages=['enigma', 'enigma.rotors', 'enigma.tests'], + package_data=dict(enigma=['examples/*.py']), + scripts=['pyenigma.py'], + classifiers = [ + 'Development Status :: 3 - Alpha', + 'Environment :: Console', + 'Intended Audience :: End Users/Desktop', + 'Intended Audience :: Developers', + 'Intended Audience :: Information Technology', + 'Intended Audience :: Science/Research', + 'Intended Audience :: Other Audience', + 'Intended Audience :: Education', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + 'Natural Language :: English', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Topic :: Communications', + 'Topic :: Security', + 'Topic :: Security :: Cryptography', + 'Topic :: Software Development :: Libraries', + 'Topic :: Software Development :: Libraries :: Python Modules', + 'Topic :: Utilities', + ], +)