|
1 | 1 | # -*- coding: utf-8 -*-
|
2 | 2 |
|
3 |
| -try: |
4 |
| - from setuptools import setup, find_packages |
5 |
| -except ImportError: |
6 |
| - from distutils.core import setup |
7 |
| - |
8 |
| -try: |
9 |
| - from pip._internal.req import parse_requirements |
10 |
| -except ImportError: |
11 |
| - from pip.req import parse_requirements |
| 3 | +from setuptools import setup, find_packages |
12 | 4 |
|
13 | 5 | from distutils.core import Extension
|
14 |
| -import plasma |
15 |
| - |
16 |
| -requirements = parse_requirements('requirements.txt', session=False) |
17 |
| - |
18 |
| -requires = [] |
19 |
| -for item in requirements: |
20 |
| - # we want to handle package names and also repo urls |
21 |
| - if getattr(item, 'url', None): # older pip has url |
22 |
| - links.append(str(item.url)) |
23 |
| - if getattr(item, 'link', None): # newer pip has link |
24 |
| - links.append(str(item.link)) |
25 |
| - if item.req: |
26 |
| - requires.append(str(item.req)) |
27 |
| - |
28 |
| - |
29 |
| -x86_analyzer = Extension('plasma.lib.arch.x86.analyzer', |
30 |
| - sources = ['plasma/lib/arch/x86/analyzer.c']) |
31 |
| - |
32 |
| -mips_analyzer = Extension('plasma.lib.arch.mips.analyzer', |
33 |
| - sources = ['plasma/lib/arch/mips/analyzer.c']) |
34 |
| - |
35 |
| -arm_analyzer = Extension('plasma.lib.arch.arm.analyzer', |
36 |
| - sources = ['plasma/lib/arch/arm/analyzer.c']) |
37 |
| - |
38 | 6 |
|
39 | 7 | setup(
|
40 |
| - name='plasma', |
41 |
| - version='1.0', |
42 |
| - url="https://github.com/joelpx/plasma", |
43 |
| - description='plasma disassembler for x86/ARM/MIPS', |
44 |
| - license="GPLv3", |
45 | 8 | ext_modules=[
|
46 |
| - x86_analyzer, |
47 |
| - mips_analyzer, |
48 |
| - arm_analyzer, |
49 |
| - ], |
50 |
| - packages=['plasma', |
51 |
| - 'plasma.lib', |
52 |
| - 'plasma.lib.arch', |
53 |
| - 'plasma.lib.arch.x86', |
54 |
| - 'plasma.lib.arch.mips', |
55 |
| - 'plasma.lib.arch.arm', |
56 |
| - 'plasma.lib.ui', |
57 |
| - 'plasma.lib.fileformat', |
58 |
| - 'plasma.lib.fileformat.relocations', |
59 |
| - 'plasma.scripts', |
60 |
| - ], |
61 |
| - package_dir={'plasma':'plasma'}, |
62 |
| - install_requires=requires, |
63 |
| - entry_points = { |
64 |
| - "console_scripts": [ |
65 |
| - "plasma = plasma.main:console_entry", |
66 |
| - ], |
67 |
| - }, |
| 9 | + Extension('plasma.lib.arch.x86.analyzer', sources = ['plasma/lib/arch/x86/analyzer.c']), |
| 10 | + Extension('plasma.lib.arch.mips.analyzer', sources = ['plasma/lib/arch/mips/analyzer.c']), |
| 11 | + Extension('plasma.lib.arch.arm.analyzer', sources = ['plasma/lib/arch/arm/analyzer.c']), |
| 12 | + ] |
68 | 13 | )
|
0 commit comments