github.com/jaylevin/jenkins-library@v1.230.4/pkg/piperutils/testdata/2_setup.py (about) 1 from setuptools import setup, find_packages 2 from codecs import open 3 from os import path 4 5 def get_version(): 6 with open('version.txt') as ver_file: 7 version_str = ver_file.readline().rstrip() 8 return version_str 9 10 11 def get_install_requires(): 12 with open('requirements.txt') as reqs_file: 13 reqs = [line.rstrip() for line in reqs_file.readlines()] 14 return reqs 15 16 setup(name="some-test", 17 version="1.0.0", 18 python_requires='>=3', 19 packages=find_packages(exclude=['contrib', 'docs', 'tests*', 'coverage', 'bin']), 20 description="test", 21 install_requires=get_install_requires(), 22 )