Install script and dependencies
authorStanisław Pitucha <stanislaw.pitucha@hp.com>
Thu, 17 Dec 2015 03:25:16 +0000 (14:25 +1100)
committerStanisław Pitucha <stanislaw.pitucha@hp.com>
Thu, 17 Dec 2015 03:26:29 +0000 (14:26 +1100)
Make sure that `pip install` installs both the pyasn1gen script and pyparsing
automatically.

setup.py

index f842f4a..b2c6e77 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,10 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-from distutils.core import setup
+try:
+    from setuptools import setup
+except:
+    from distutils.core import setup
 
 setup(
     name='asn1ate',
@@ -17,8 +20,8 @@ setup(
         'asn1ate.support',
     ],
     platforms=['any'],
-    requires=[
-        'pyparsing (>=2.0.0)',
+    install_requires=[
+        'pyparsing>=2.0.0',
     ],
     classifiers=[
         'Development Status :: 3 - Alpha',
@@ -28,5 +31,10 @@ setup(
         'Programming Language :: Python',
         'Programming Language :: Python :: 3',
         'Topic :: Software Development :: Code Generators',
-    ]
+    ],
+    entry_points={
+        'console_scripts': [
+            'asn1ate = asn1ate.pyasn1gen:main'
+            ]
+    },
 )