#!/usr/bin/env python import os import re from setuptools import setup, find_packages def read_version(name): with open(os.path.join(os.path.dirname(__file__), name, '__init__.py')) as f: for line in f: match = re.match(r"^__version__ = ['\"]([^'\"]*)['\"]", line) if match: return match.group(1) raise RuntimeError("Unable to find version string.") def parse_requirements(filename): with open(filename, 'r') as file: return file.read().splitlines() # Get the long description from the README file here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name = 'labhw', version = read_version('labhw'), author = "Francois Boulogne", license = "BSD", author_email = "devel@sciunto.org", description = "Manage my lab hardware", long_description=long_description, long_description_content_type='text/markdown', scripts = ['bin/listUSBdevice.py', 'bin/getUSBport.py', ], # Automatically find packages in the current directory packages=find_packages(), # Required # Include additional files specified in MANIFEST.in include_package_data=True, # Optional # Define your dependencies in a separate file install_requires=parse_requirements('requirements.txt'), # Optional )