setup.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Copyright 2024 Google LLC
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. # Always prefer setuptools over distutils
  15. from setuptools import setup, find_packages
  16. # To use a consistent encoding
  17. from codecs import open
  18. from os import path
  19. import sys
  20. here = path.abspath(path.dirname(__file__))
  21. # Get the long description from the README file
  22. with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
  23. long_description = f.read()
  24. requires = [
  25. 'cobs',
  26. 'construct>=2.5.3,<2.8',
  27. 'pyserial',
  28. 'transitions==0.4.1',
  29. ]
  30. test_requires = []
  31. if sys.version_info < (3, 3, 0):
  32. test_requires.append('mock>=2.0.0')
  33. if sys.version_info < (3, 4, 0):
  34. requires.append('enum34')
  35. setup(
  36. name='pebble.pulse2',
  37. version='0.0.7',
  38. description='Python tools for connecting to PULSEv2 links',
  39. long_description=long_description,
  40. url='https://github.com/pebble/pulse2',
  41. author='Pebble Technology Corporation',
  42. author_email='cory@pebble.com',
  43. packages=find_packages(exclude=['contrib', 'docs', 'tests']),
  44. namespace_packages = ['pebble'],
  45. install_requires=requires,
  46. extras_require={
  47. 'test': test_requires,
  48. },
  49. test_suite = 'tests',
  50. )