yml2c
author Claudio Luck <claudio.luck@pep.foundation>
Thu, 19 Mar 2020 17:17:22 +0100
changeset 66 701c5e980f33
parent 65 d659b8c2ed22
permissions -rwxr-xr-x
read version from setup.cfg
31
d3dddb80d1f5 adapting to Python 3
Volker Birk <vb@pep-project.org>
parents: 29
diff changeset
     1
#!/usr/bin/env python3
62
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 58
diff changeset
     2
import sys, os
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 58
diff changeset
     3
sys.path.insert(0, os.path.dirname(__file__))
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 58
diff changeset
     4
try:
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 58
diff changeset
     5
    from yml2 import yml2c
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 58
diff changeset
     6
except ImportError as e:
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 58
diff changeset
     7
    import pkg_resources
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 58
diff changeset
     8
    pkg_resources.require('YML2')
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 58
diff changeset
     9
    from yml2 import yml2c
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 58
diff changeset
    10
sys.exit(yml2c.main())