Ein Roboter mit bürstenlosem Antrieb, differenzial und NRF24L01 Funk. Großflächig gebaut um ein großes Solarpanel aufzunehmen. https://gitlab.informatik.hs-fulda.de/fdai5253/roboter
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.2 KiB

  1. #!/usr/bin/env python
  2. import os
  3. import sys
  4. import setuptools
  5. import crossunixccompiler
  6. version = ''
  7. def process_configparams():
  8. global version
  9. with open('../Makefile.inc') as f:
  10. config_lines = f.read().splitlines()
  11. cflags = os.getenv("CFLAGS", "")
  12. for line in config_lines:
  13. identifier, value = line.split('=', 1)
  14. if identifier == "CPUFLAGS":
  15. cflags += " " + value
  16. elif identifier == "HEADER_DIR":
  17. cflags += " -I" + os.path.dirname(value)
  18. elif identifier == "LIB_DIR":
  19. cflags += " -L" + value
  20. elif identifier == "LIB_VERSION":
  21. version = value
  22. elif identifier in ("CC", "CXX"):
  23. os.environ[identifier] = value
  24. os.environ["CFLAGS"] = cflags
  25. if sys.version_info >= (3,):
  26. BOOST_LIB = 'boost_python3'
  27. else:
  28. BOOST_LIB = 'boost_python'
  29. process_configparams()
  30. crossunixccompiler.register()
  31. module_RF24 = setuptools.Extension('RF24',
  32. libraries=['rf24', BOOST_LIB],
  33. sources=['pyRF24.cpp'])
  34. setuptools.setup(name='RF24',
  35. version=version,
  36. ext_modules=[module_RF24])