diff options
author | Sebastian Ramacher <sebastian@ramacher.at> | 2012-10-14 13:11:28 +0200 |
---|---|---|
committer | Dwayne Litzenberger <dlitz@dlitz.net> | 2013-02-02 19:29:05 -0800 |
commit | 68cce56d91a8b96b685d97c937a78b061afbc834 (patch) | |
tree | 7fb91b788b873362c2420f14a75ad92c6d9235d2 | |
parent | ab110a4113f5e8672d80c5845178268774b7ea23 (diff) | |
download | pycrypto-68cce56d91a8b96b685d97c937a78b061afbc834.tar.gz |
Use os.chmod instead of os.system("chmod ...")
-rw-r--r-- | setup.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -274,8 +274,11 @@ class PCTBuildConfigure(Command): def run(self): if not os.path.exists("config.status"): - if os.system("chmod 0755 configure") != 0: - raise RuntimeError("chmod error") + if hasattr(os, "chmod"): + import stat + os.chmod("configure", stat.S_IRUSR | stat.S_IWUSR | + stat.S_IXUSR | stat.S_IRGRP | stat.S_IXGRP | + stat.S_IROTH | stat.S_IXOTH) cmd = "sh configure" # we use "sh" here so that it'll work on mingw32 with standard python.org binaries if self.verbose < 1: cmd += " -q" |