1import os 2import re 3from setuptools import setup, find_packages 4 5 6project_dir = os.path.abspath(os.path.dirname(__file__)) 7 8with open(os.path.join(project_dir, 'version.txt')) as f: 9 version = f.read().rstrip() 10 11# We use the .in file because a library shouldn't pin versions, it breaks consumers' updates. 12# We allow commented lines in this file 13with open(os.path.join(project_dir, 'requirements.txt.in')) as f: 14 requirements_raw = f.readlines() 15 16requirements_without_comments = [ 17 line for line in requirements_raw if line and not line.startswith('#') 18] 19 20setup( 21 name='mozilla-version', 22 version=version, 23 description="""Process Firefox versions numbers. Tells whether they are valid or not, whether \ 24they are nightlies or regular releases, whether this version precedes that other. 25 """, 26 author='Mozilla Release Engineering', 27 author_email='release+python@mozilla.com', 28 url='https://github.com/mozilla-releng/mozilla-version', 29 packages=find_packages(), 30 include_package_data=True, 31 zip_safe=False, 32 license='MPL2', 33 install_requires=requirements_without_comments, 34 classifiers=( 35 'Programming Language :: Python :: 2.7', 36 'Programming Language :: Python :: 3', 37 ), 38) 39