-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
43 lines (33 loc) · 958 Bytes
/
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
"""
Setup for the freemix framework.
"""
from setuptools import setup, find_packages
VERSION = __import__('freemix').__version__
from distutils.command.sdist import sdist
from distutils.command.build import build
import os
def write_version_file():
f = open("freemix/version.py", "w")
f.write('__version__ = "%s"\n' % (VERSION,))
f.close()
def remove_version_file():
os.remove("freemix/version.py")
class sdist_version(sdist):
def run(self):
write_version_file()
sdist.run(self)
remove_version_file()
class build_version(build):
def run(self):
write_version_file()
build.run(self)
remove_version_file()
setup(
name = "freemix",
version = VERSION,
description = "Freemix framework",
url = "http://foundry.zepheira.com/hg/freemix",
packages = find_packages(),
include_package_data=True,
cmdclass = {'sdist': sdist_version, 'build': build_version},
)