-
Notifications
You must be signed in to change notification settings - Fork 15
/
setup.py
64 lines (52 loc) · 1.79 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from setuptools import find_packages, setup, Extension
import os
from sys import platform
from setuptools.command.install import install
from distutils.command.build import build
from subprocess import call
from multiprocessing import cpu_count
BASEPATH = os.path.dirname(os.path.abspath(__file__))
class ESSPBuild(build):
def run(self):
# run original build code
build.run(self)
cmd = [
'make',
]
def compile():
call(cmd, cwd=os.path.join(BASEPATH, "_eSSP"))
self.execute(compile, [], 'Compiling library')
if not self.dry_run:
self.copy_file(os.path.join(BASEPATH, "_eSSP", "libessp.so"),
os.path.join(self.build_lib, "eSSP"))
class ESSPInstall(install):
def initialize_options(self):
install.initialize_options(self)
self.build_scripts = None
def finalize_options(self):
install.finalize_options(self)
self.set_undefined_options('build', ('build_scripts', 'build_scripts'))
def run(self):
# run original install code
install.run(self)
# install library
self.copy_tree(self.build_lib, self.install_lib)
setup(name="eSSP6",
version="1.0.9",
description="Encrypted Smiley Secure Protocol Python 3 Implementation",
long_description="Description is avaible in the github repository",
author="Loan & Innovative Technology (Some of the C code)",
author_email="minege02@gmail.com",
platforms=["cygwin","osx"],
license="MIT",
url="https://github.com/Minege/eSSP",
packages=find_packages(),
cmdclass={
'build': ESSPBuild,
'install': ESSPInstall,
},
install_requires=[
"aenum",
"six",
]
)