Commit 38c3a65c authored by Denis Bilenko's avatar Denis Bilenko

rename make_dist to makedist

--HG--
rename : util/make_dist.py => util/makedist.py
parent f238b324
...@@ -47,15 +47,15 @@ def iter_status(command): ...@@ -47,15 +47,15 @@ def iter_status(command):
yield line[:1], line[1:].strip() yield line[:1], line[1:].strip()
def make_dist(*args, **kwargs): def makedist(*args, **kwargs):
cwd = os.getcwd() cwd = os.getcwd()
try: try:
return _make_dist(*args, **kwargs) return _makedist(*args, **kwargs)
finally: finally:
os.chdir(cwd) os.chdir(cwd)
def _make_dist(version='dev', fast=False, revert=False): def _makedist(version='dev', fast=False, revert=False):
assert exists('gevent/__init__.py'), 'Where am I?' assert exists('gevent/__init__.py'), 'Where am I?'
basedir = abspath(os.getcwd()) basedir = abspath(os.getcwd())
...@@ -136,7 +136,7 @@ def main(): ...@@ -136,7 +136,7 @@ def main():
if len(args) != 1: if len(args) != 1:
sys.exit('Expected one argument: version (could be "dev").') sys.exit('Expected one argument: version (could be "dev").')
return make_dist(args[0], fast=options.fast, revert=options.revert) return makedist(args[0], fast=options.fast, revert=options.revert)
def copy(source, dest): def copy(source, dest):
......
...@@ -112,7 +112,7 @@ def unlink(path): ...@@ -112,7 +112,7 @@ def unlink(path):
def write(filename, data): def write(filename, data):
# intentionally breaking links here so that util/make_dist.py can use "cp --link" # intentionally breaking links here so that util/makedist.py can use "cp --link"
tmpname = filename + '.tmp.%s' % os.getpid() tmpname = filename + '.tmp.%s' % os.getpid()
f = open(tmpname, 'w') f = open(tmpname, 'w')
try: try:
......
...@@ -69,8 +69,8 @@ def main(): ...@@ -69,8 +69,8 @@ def main():
options.username = getpass.getuser() options.username = getpass.getuser()
if not options.source: if not options.source:
import make_dist import makedist
options.source = make_dist.make_dist('dev', fast=True) options.source = makedist.makedist('dev', fast=True)
options.source = os.path.abspath(options.source) options.source = os.path.abspath(options.source)
options.unique = uuid.uuid4().hex options.unique = uuid.uuid4().hex
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment