Skip to content

Commit 5c8b12a

Browse files
committedMar 15, 2017
Clean setup.py for a clean installation.
1 parent 0df198f commit 5c8b12a

11 files changed

+180
-18
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ syntax: glob
99
.idea/
1010

1111
build/*
12+
pyEnigma.egg-info/
1213
dist/*
1314

1415
.coverage

‎CHANGELOG.rst

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Release History
2+
===============
3+
4+
0.1 (2017-03-15)
5+
------------------
6+
7+
* first release on pypi.

‎MANIFEST.in

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#Misc
2+
include COPYING
3+
include README.rst
4+
include CHANGELOG.rst

‎README.md ‎README.rst

+16-11
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
11
pyEnigma
22
========
33

4-
[![Build](https://img.shields.io/travis/cedricbonhomme/pyEnigma/master.svg?style=flat-square)](https://travis-ci.org/cedricbonhomme/pyEnigma)
5-
[![Coverage](https://img.shields.io/coveralls/cedricbonhomme/pyEnigma/master.svg?style=flat-square)](https://coveralls.io/github/cedricbonhomme/pyEnigma?branch=master)
4+
.. image:: https://img.shields.io/travis/cedricbonhomme/pyEnigma/master.svg?style=flat-square
5+
:target: https://travis-ci.org/cedricbonhomme/pyEnigma
66

7+
.. image:: https://img.shields.io/coveralls/cedricbonhomme/pyEnigma/master.svg?style=flat-square
8+
:target: https://coveralls.io/github/cedricbonhomme/pyEnigma?branch=master
79

8-
#### Python Enigma cypher machine simulator.
910

10-
Presentation
11-
------------
12-
[pyEnigma](https://github.com/cedricbonhomme/pyEnigma) has been tested with Python 2 -> Python 3.3.
11+
`pyEnigma <https://github.com/cedricbonhomme/pyEnigma>`_, a Python Enigma
12+
cypher machine simulator.
1313

1414

1515
Installation
1616
------------
1717

18-
$ cd pyenigma
19-
$ sudo python setup.py install
18+
.. code:: bash
19+
20+
$ sudo pip install pyenigma
2021
2122
2223
Usage
2324
-----
2425

2526
As a Python module:
2627

28+
.. code:: python
29+
2730
Python 3.5.2 (default, Oct 20 2016, 10:10:10)
2831
[GCC 6.2.0 20161005] on linux
2932
Type "help", "copyright", "credits" or "license" for more information.
@@ -72,6 +75,8 @@ As a Python module:
7275
7376
Command line:
7477
78+
.. code:: bash
79+
7580
$ echo "Hello World" | ./cypher_enigma_safe.py ABC A I II III "AV BS CG DL FU HZ IN KM OW RX"
7681
Qgqop Vwoxn
7782
@@ -82,11 +87,11 @@ Command line:
8287
License
8388
-------
8489
85-
pyEnigma is under [GPLv3](http://www.gnu.org/licenses/gpl-3.0.txt) license.
90+
pyEnigma is under `GPLv3 <http://www.gnu.org/licenses/gpl-3.0.txt>`_ license.
8691
8792
8893
Author
8994
------
9095
91-
* [Christophe Goessen](https://bitbucket.org/azmaeve) (main author)
92-
* [Cédric Bonhomme](https://www.cedricbonhomme.org)
96+
* `Christophe Goessen <https://github.com/cgoessen>`_ (initial author)
97+
* `Cédric Bonhomme <https://www.cedricbonhomme.org>`_

‎pyEnigma.egg-info/PKG-INFO

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
Metadata-Version: 1.1
2+
Name: pyEnigma
3+
Version: 0.1
4+
Summary: Python Enigma cypher machine simulator.
5+
Home-page: https://github.com/cedricbonhomme/pyEnigma
6+
Author: Christophe Goessen, Cédric Bonhomme
7+
Author-email: cedric@cedricbonhomme.org
8+
License: GPLv3
9+
Description: pyEnigma
10+
========
11+
12+
.. image:: https://img.shields.io/travis/cedricbonhomme/pyEnigma/master.svg?style=flat-square
13+
:target: https://travis-ci.org/cedricbonhomme/pyEnigma
14+
15+
.. image:: https://img.shields.io/coveralls/cedricbonhomme/pyEnigma/master.svg?style=flat-square
16+
:target: https://coveralls.io/github/cedricbonhomme/pyEnigma?branch=master
17+
18+
19+
`pyEnigma <https://github.com/cedricbonhomme/pyEnigma>`_, a Python Enigma
20+
cypher machine simulator.
21+
22+
23+
Installation
24+
------------
25+
26+
.. code:: bash
27+
28+
$ sudo pip install pyenigma
29+
30+
31+
Usage
32+
-----
33+
34+
As a Python module:
35+
36+
.. code:: python
37+
38+
Python 3.5.2 (default, Oct 20 2016, 10:10:10)
39+
[GCC 6.2.0 20161005] on linux
40+
Type "help", "copyright", "credits" or "license" for more information.
41+
>>> from pyenigma import enigma
42+
>>> from pyenigma import rotor
43+
>>> print(rotor.ROTOR_GR_III)
44+
45+
Name: III
46+
Model: German Railway (Rocket)
47+
Date: 7 February 1941
48+
Wiring: JVIUBHTCDYAKEQZPOSGXNRMWFL
49+
>>>
50+
>>> engr = enigma.Enigma(rotor.ROTOR_Reflector_A, rotor.ROTOR_I, rotor.ROTOR_II, rotor.ROTOR_III, key="ABC", plugs="AV BS CG DL FU HZ IN KM OW RX")
51+
>>> print(engr)
52+
53+
Reflector:
54+
Name: Reflector A
55+
Model: None
56+
Date: None
57+
Wiring: EJMZALYXVBWFCRQUONTSPIKHGD
58+
59+
Rotor 1:
60+
Name: I
61+
Model: Enigma 1
62+
Date: 1930
63+
Wiring: EKMFLGDQVZNTOWYHXUSPAIBRCJ
64+
State: A
65+
66+
Rotor 2:
67+
Name: II
68+
Model: Enigma 1
69+
Date: 1930
70+
Wiring: AJDKSIRUXBLHWTMCQGZNPYFVOE
71+
State: B
72+
73+
Rotor 3:
74+
Name: III
75+
Model: Enigma 1
76+
Date: 1930
77+
Wiring: BDFHJLCPRTXVZNYEIWGAKMUSQO
78+
State: C
79+
>>> res = engr.encipher("Hello World")
80+
>>> print res
81+
Qgqop Vwoxn
82+
83+
84+
Command line:
85+
86+
.. code:: bash
87+
88+
$ echo "Hello World" | ./cypher_enigma_safe.py ABC A I II III "AV BS CG DL FU HZ IN KM OW RX"
89+
Qgqop Vwoxn
90+
91+
$ echo "Qgqop Vwoxn" | ./cypher_enigma_safe.py ABC A I II III "AV BS CG DL FU HZ IN KM OW RX"
92+
Hello World
93+
94+
95+
License
96+
-------
97+
98+
pyEnigma is under `GPLv3 <http://www.gnu.org/licenses/gpl-3.0.txt>`_ license.
99+
100+
101+
Author
102+
------
103+
104+
* `Christophe Goessen <https://github.com/cgoessen>`_ (initial author)
105+
* `Cédric Bonhomme <https://www.cedricbonhomme.org>`_
106+
107+
108+
Release History
109+
===============
110+
111+
0.1 (2017-03-15)
112+
------------------
113+
114+
* first release on pypi.
115+
116+
Platform: UNKNOWN
117+
Classifier: Development Status :: 5 - Production/Stable
118+
Classifier: Environment :: Console
119+
Classifier: Intended Audience :: Developers
120+
Classifier: Intended Audience :: Science/Research
121+
Classifier: Topic :: Security
122+
Classifier: Operating System :: OS Independent
123+
Classifier: Programming Language :: Python
124+
Classifier: Programming Language :: Python :: 2.7
125+
Classifier: Programming Language :: Python :: 3.5
126+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)

‎pyEnigma.egg-info/SOURCES.txt

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
CHANGELOG.rst
2+
COPYING
3+
MANIFEST.in
4+
README.rst
5+
setup.cfg
6+
setup.py
7+
pyEnigma.egg-info/PKG-INFO
8+
pyEnigma.egg-info/SOURCES.txt
9+
pyEnigma.egg-info/dependency_links.txt
10+
pyEnigma.egg-info/not-zip-safe
11+
pyEnigma.egg-info/top_level.txt
12+
pyenigma/__init__.py
13+
pyenigma/enigma.py
14+
pyenigma/rotor.py
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

‎pyEnigma.egg-info/not-zip-safe

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

‎pyEnigma.egg-info/top_level.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pyenigma

‎setup.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[metadata]
2+
description-file = README.rst

‎setup.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,30 @@
1111
except ImportError:
1212
from distutils.core import setup
1313

14-
if sys.argv[-1] == 'publish':
15-
os.system('python setup.py sdist upload')
16-
sys.exit()
17-
1814
packages = [
1915
'pyenigma'
2016
]
2117

2218
requires = []
2319

20+
with open('README.rst', 'r') as f:
21+
readme = f.read()
22+
with open('CHANGELOG.rst', 'r') as f:
23+
changelog = f.read()
24+
2425
setup(
2526
name='pyEnigma',
2627
version=pyenigma.__version__,
2728
description='Python Enigma cypher machine simulator.',
28-
long_description=open('README.md').read(),
29+
long_description=readme + '\n\n' + changelog,
2930
author='Christophe Goessen, Cédric Bonhomme',
3031
author_email='cedric@cedricbonhomme.org',
3132
url='https://github.com/cedricbonhomme/pyEnigma',
3233
packages=packages,
33-
#package_data={'': ['LICENSE', 'NOTICE'], 'pyenigma': ['*.pem']},
3434
package_dir={'pyenigma': 'pyenigma'},
3535
include_package_data=True,
3636
install_requires=requires,
37-
license=open('COPYING').read(),
37+
license='GPLv3',
3838
zip_safe=False,
3939
classifiers=(
4040
'Development Status :: 5 - Production/Stable',

0 commit comments

Comments
 (0)
Please sign in to comment.