|
7 | 7 |
|
8 | 8 | # Always prefer setuptools over distutils |
9 | 9 | from setuptools import setup, find_packages |
| 10 | +import pip |
| 11 | + |
| 12 | +links = [] |
| 13 | +requires = [] |
| 14 | + |
| 15 | +requirement_files = ['requirements-base.txt'] |
| 16 | + |
| 17 | +for req_file in requirement_files: |
| 18 | + requirements = pip.req.parse_requirements(req_file, session=pip.download.PipSession()) |
| 19 | + |
| 20 | + for item in requirements: |
| 21 | + # we want to handle package names and also repo urls |
| 22 | + if getattr(item, 'url', None): # older pip has url |
| 23 | + links.append(str(item.url)) |
| 24 | + if getattr(item, 'link', None): # newer pip has link |
| 25 | + links.append(str(item.link)) |
| 26 | + if item.req: |
| 27 | + requires.append(str(item.req)) |
10 | 28 |
|
11 | 29 | description = "Binary Analysis & Management Framework" |
12 | 30 |
|
|
19 | 37 | long_description=description, |
20 | 38 | url='http://viper.li', |
21 | 39 |
|
| 40 | + platforms='any', |
22 | 41 | scripts=['viper-cli', 'viper-api', 'viper-web', 'viper-update'], |
23 | 42 | packages=find_packages(exclude=['tests', 'tests.*']), |
24 | | - setup_requires=['pytest-runner'], |
| 43 | + install_requires=requires, |
| 44 | + dependency_links=links, |
| 45 | + |
25 | 46 | tests_require=['pytest'], |
26 | 47 |
|
27 | 48 | # BSD 3-Clause License: |
|
0 commit comments