RainEagle library plus script for polling data
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.
 
 

44 lines
1.4 KiB

  1. # python setup.py --dry-run --verbose install
  2. import os.path
  3. from setuptools import setup, find_packages
  4. from distutils.command.install_scripts import install_scripts
  5. from distutils.core import setup
  6. class install_scripts_and_symlinks(install_scripts):
  7. '''Like install_scripts, but also replicating nonexistent symlinks'''
  8. def run(self):
  9. install_scripts.run(self)
  10. # Replicate symlinks if they don't exist
  11. for script in self.distribution.scripts:
  12. if os.path.islink(script):
  13. newlink = os.path.join(self.install_dir, os.path.basename(script))
  14. setup(
  15. name='RainEagle',
  16. version='0.1.8',
  17. author='Peter Shipley',
  18. author_email='Peter.Shipley@gmail.com',
  19. packages=find_packages(),
  20. scripts=[ 'bin/meter_status.py', 'bin/plot_power.py', 'bin/poll.py' ],
  21. data_files=[
  22. ('examples', ['bin/plot_power.py', 'bin/gnup_poweruse.txt']),
  23. ('bin', ['bin/meter_status.py']) ],
  24. url='https://github.com/evilpete/RainEagle',
  25. license='BSD',
  26. description='Python Class for utilizing the Rainforest Automation Eagle ( RFA-Z109 ) socket API.',
  27. download_url='https://github.com/evilpete/RainEagle/archive/0.1.8.tar.gz',
  28. long_description=open('README.md').read(),
  29. extras_require = {
  30. 'dev': [ 'coverage' ],
  31. },
  32. cmdclass = { 'install_scripts': install_scripts_and_symlinks }
  33. )