Skip to content

Commit

Permalink
Convert to setuptools from distutils to get automatic dependency install
Browse files Browse the repository at this point in the history
  • Loading branch information
pjkundert committed Jul 3, 2013
1 parent f61c8f8 commit 3ab212a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ auto/
build/
MANIFEST
dist/
*.egg-info/
5 changes: 1 addition & 4 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
parsing and state machinery library, 'web', the web.py framework, and (for
testing) 'pytest'.

To install 'cpppo', 'greenery', and web.py (if you desire the web API) using
pip:
To install 'cpppo' and its dependencies 'greenery', and 'web.py' using pip:
: $ pip install cpppo
: $ pip install greenery
: $ pip install web

If you need system admin privileges to install packages, you may need to use
'sudo' on the above pip commands:
Expand Down
2 changes: 1 addition & 1 deletion misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
__email__ = "[email protected]"
__copyright__ = "Copyright (c) 2013 Hard Consulting Corporation"
__license__ = "Dual License: GPLv3 (or later) and Commercial (see LICENSE)"
__version__ = "1.0"
__version__ = "1.1"

"""
Miscellaneous functionality used by various other modules.
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
greenery>=1.0
web.py>=0.37
6 changes: 3 additions & 3 deletions server/enip/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ def enip_encode( data ):
result = b''.join( [
UINT.produce( data.command ),
UINT.produce(len(data.input )),
UDINT.produce( data.session_handle ),
UDINT.produce( data.status ),
octets_encode( data.sender_context.input ),
UDINT.produce( data.session_handle ),
UDINT.produce( data.status ),
octets_encode( data.sender_context.input ),
UDINT.produce( data.options ),
octets_encode( data.input ),
])
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from distutils.core import setup
from setuptools import setup

from misc import __version__

setup(
name = "cpppo",
version = __version__,
requires = ['greenery', 'web'],
tests_require = [ 'pytest' ],
install_requires = open( 'requirements.txt' ).readlines(),
packages = ['', 'server', 'server/enip'],
package_dir = {'': '.'},
extra_path = 'cpppo',
Expand All @@ -29,7 +30,7 @@
Controller).""",
license = "Dual License; GPLv3 and Proprietary",
keywords = "cpppo protocol parser DFA",
url = "https://github.com/pkundert/cpppo",
url = "https://github.com/pjkundert/cpppo",
classifiers = [
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"License :: Other/Proprietary License",
Expand Down

0 comments on commit 3ab212a

Please sign in to comment.