Browse Source

add pEpACIDgen-config using entry_points

master
heck 5 years ago
parent
commit
7b97dae97f
  1. 12
      gen/pEpACIDgen/__main__.py
  2. 14
      gen/setup.cfg
  3. 4
      gen/setup.py

12
gen/bin/pEp_acid_gen → gen/pEpACIDgen/__main__.py

@ -3,6 +3,7 @@
# This file is under GNU Affero General Public License 3.0
# see LICENSE.txt
import os
import sys
import json
import pEpACIDgen
@ -16,7 +17,8 @@ def usage():
def print_indent(*args, indent=0):
print('\t' * indent, *args)
def main():
# entry_point (command/script): pEp_acid_gen
def gen():
if len(sys.argv) <= 1:
usage()
exit(-1)
@ -65,5 +67,9 @@ def main():
utils.write_string(header["acid_yml"], "./" + "py_module" + ".yml2", )
if __name__ == "__main__":
main()
# entry_point (command/script): pEp_acid_gen-config
def get_gen_backend_pyBind11():
dir_self = os.path.abspath(os.path.dirname(__file__))
gen_backend_dir = os.path.join(dir_self, "gen_backend")
pybind_backend_file = os.path.join(gen_backend_dir,"gen_pybind11.ysl2")
print(pybind_backend_file)

14
gen/setup.cfg

@ -22,24 +22,26 @@ classifiers =
[options]
scripts = bin/pEp_acid_gen
include_package_data=true
packages = find:
python_requires = >= 3.6
zip_safe = true
# include_package_data = true
# keep aligned with setup.py
#test_suite = tests
test_suite = tests
# deprecated/redundant with pyproject.toml, but lets keep both ways around for now
setup_requires =
setuptools >= 39.2.0
wheel >= 0.35.1
pybind11 >= 2.6.1
install_requires =
clang
yml2
[options.entry_points]
console_scripts =
pEp_acid_gen = pEpACIDgen.__main__:gen
pEp_acid_gen-config = pEpACIDgen.__main__:get_gen_backend_pyBind11
[options.extras_require]
test = pytest

4
gen/setup.py

@ -3,6 +3,4 @@
# see LICENSE.txt
from setuptools import setup
setup(
)
setup()

Loading…
Cancel
Save