Skip to content
Snippets Groups Projects
Commit e88fd81a authored by chrysn's avatar chrysn
Browse files

setup: fixes for other `setup.py test`

* work relative to __file__ rather than assuming that setup.py is in the
  working directory

* update the submodule (it might be practical for some cases to make
  that conditional on the submodule directory being empty)
parent 078f8e55
No related branches found
No related tags found
No related merge requests found
import os.path
import subprocess import subprocess
from distutils.core import setup from distutils.core import setup
...@@ -9,8 +10,9 @@ class prepare_tinydtls(build_ext): ...@@ -9,8 +10,9 @@ class prepare_tinydtls(build_ext):
def run(self): def run(self):
def run_command(args): def run_command(args):
print("Running:", " ".join(args)) print("Running:", " ".join(args))
subprocess.check_call(args, cwd="./DTLSSocket/tinydtls") subprocess.check_call(args, cwd=os.path.join(os.path.dirname(__file__), "./DTLSSocket/tinydtls"))
commands = [ commands = [
["git", "submodule", "update", "--init"],
["autoconf"], ["autoconf"],
["autoheader"], ["autoheader"],
["./configure", "--without-ecc"], ["./configure", "--without-ecc"],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment