Browse Source

Switch build system to waf.

pyside
Ben Niemann 3 years ago
parent
commit
0e4c0ddf10
  1. 3
      .gitignore
  2. 1
      .projectile
  3. 186
      3rdparty/csound/setup.py
  4. 169
      3rdparty/faust/setup.py
  5. 158
      3rdparty/faustlibraries/setup.py
  6. 219
      3rdparty/lilv/setup.py
  7. 181
      3rdparty/lv2/setup.py
  8. 191
      3rdparty/protoc/setup.py
  9. 184
      3rdparty/suil/setup.py
  10. 170
      CMakeLists.txt
  11. 34
      README.md
  12. 19
      bin/noisica√§
  13. 21
      bin/runpylint
  14. 16
      bin/runtests
  15. 7
      build_utils/__init__.py
  16. 2
      build_utils/build_model.py
  17. 2
      build_utils/mksf2.py
  18. 0
      build_utils/model_desc.proto
  19. 0
      build_utils/process_svg.py
  20. 8
      build_utils/waf/README.md
  21. 6
      build_utils/waf/__init__.py
  22. 64
      build_utils/waf/csound.py
  23. 112
      build_utils/waf/cython.py
  24. 63
      build_utils/waf/faust.py
  25. 122
      build_utils/waf/install.py
  26. 25
      build_utils/waf/local_rpath.py
  27. 62
      build_utils/waf/model.py
  28. 58
      build_utils/waf/plugins.py
  29. 134
      build_utils/waf/proto.py
  30. 74
      build_utils/waf/python.py
  31. 60
      build_utils/waf/sf2.py
  32. 67
      build_utils/waf/static.py
  33. 50
      build_utils/waf/svg.py
  34. 840
      build_utils/waf/virtenv.py
  35. 19
      build_utils/wscript
  36. 78
      cmake/FindCython.cmake
  37. 63
      cmake/FindNumPy.cmake
  38. 539
      cmake/FindPythonExtensions.cmake
  39. 395
      cmake/UseCython.cmake
  40. 580
      cmake/targetLinkLibrariesWithDynamicLookup.cmake
  41. 32
      data/csound/wscript
  42. 62
      data/icons/CMakeLists.txt
  43. BIN
      data/icons/noisicaa-small.png
  44. 63
      data/icons/wscript
  45. 8
      data/presets/wscript
  46. 10
      data/sounds/wscript
  47. 42
      data/symbols/CMakeLists.txt
  48. 42
      data/symbols/wscript
  49. 17
      data/wscript
  50. 10
      docs/dev/vmtests.md
  51. 295
      listdeps
  52. 8
      misc/noisicaa
  53. 6
      misc/noisicaa.desktop
  54. 25
      misc/wscript
  55. 192
      noisicaa/audioproc/engine/CMakeLists.txt
  56. 135
      noisicaa/audioproc/engine/wscript
  57. 107
      noisicaa/audioproc/public/CMakeLists.txt
  58. 87
      noisicaa/audioproc/public/wscript
  59. 24
      noisicaa/audioproc/wscript
  60. 32
      noisicaa/bindings/wscript
  61. 83
      noisicaa/builtin_nodes/CMakeLists.txt
  62. 24
      noisicaa/builtin_nodes/beat_track/wscript
  63. 47
      noisicaa/builtin_nodes/control_track/CMakeLists.txt
  64. 64
      noisicaa/builtin_nodes/control_track/wscript
  65. 41
      noisicaa/builtin_nodes/custom_csound/CMakeLists.txt
  66. 50
      noisicaa/builtin_nodes/custom_csound/wscript
  67. 42
      noisicaa/builtin_nodes/cv_mapper/CMakeLists.txt
  68. 51
      noisicaa/builtin_nodes/cv_mapper/wscript
  69. 44
      noisicaa/builtin_nodes/instrument/CMakeLists.txt
  70. 62
      noisicaa/builtin_nodes/instrument/wscript
  71. 43
      noisicaa/builtin_nodes/metronome/CMakeLists.txt
  72. 51
      noisicaa/builtin_nodes/metronome/wscript
  73. 49
      noisicaa/builtin_nodes/midi_cc_to_cv/CMakeLists.txt
  74. 68
      noisicaa/builtin_nodes/midi_cc_to_cv/wscript
  75. 47
      noisicaa/builtin_nodes/midi_looper/CMakeLists.txt
  76. 64
      noisicaa/builtin_nodes/midi_looper/wscript
  77. 39
      noisicaa/builtin_nodes/midi_monitor/CMakeLists.txt
  78. 46
      noisicaa/builtin_nodes/midi_monitor/wscript
  79. 44
      noisicaa/builtin_nodes/midi_source/CMakeLists.txt
  80. 63
      noisicaa/builtin_nodes/midi_source/wscript
  81. 42
      noisicaa/builtin_nodes/midi_velocity_mapper/CMakeLists.txt
  82. 51
      noisicaa/builtin_nodes/midi_velocity_mapper/wscript
  83. 40
      noisicaa/builtin_nodes/mixer/wscript
  84. 28
      noisicaa/builtin_nodes/noise/wscript
  85. 32
      noisicaa/builtin_nodes/oscillator/CMakeLists.txt
  86. 28
      noisicaa/builtin_nodes/oscillator/wscript
  87. 42
      noisicaa/builtin_nodes/oscilloscope/CMakeLists.txt
  88. 51
      noisicaa/builtin_nodes/oscilloscope/wscript
  89. 37
      noisicaa/builtin_nodes/pianoroll/CMakeLists.txt
  90. 56
      noisicaa/builtin_nodes/pianoroll/wscript
  91. 48
      noisicaa/builtin_nodes/sample_track/CMakeLists.txt
  92. 65
      noisicaa/builtin_nodes/sample_track/wscript
  93. 33
      noisicaa/builtin_nodes/score_track/wscript
  94. 43
      noisicaa/builtin_nodes/step_sequencer/CMakeLists.txt
  95. 53
      noisicaa/builtin_nodes/step_sequencer/wscript
  96. 32
      noisicaa/builtin_nodes/vca/CMakeLists.txt
  97. 17
      noisicaa/builtin_nodes/vca/wscript
  98. 96
      noisicaa/builtin_nodes/wscript
  99. 2
      noisicaa/constants.py
  100. 81
      noisicaa/core/CMakeLists.txt
  101. Some files were not shown because too many files have changed in this diff Show More

3
.gitignore vendored

@ -8,3 +8,6 @@ __pycache__/
/.venv
/website/_build/
/website/_serve/
/.waf*
/.lock-waf*
/venv/

1
.projectile

@ -1 +1,2 @@
-/build
-/venv

186
3rdparty/csound/setup.py vendored

@ -1,186 +0,0 @@
# @begin:license
#
# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# @end:license
from distutils import core
from distutils.command.build import build
from distutils.command.install import install
import urllib.request
import os
import os.path
import subprocess
import sys
import time
import zipfile
VERSION = '6.8.0'
DOWNLOAD_URL = 'https://github.com/csound/csound/archive/6.08.0.zip'
assert os.getenv('VIRTUAL_ENV'), "Not running in a virtualenv."
class CSoundMixin(object):
user_options = [
('build-base=', 'b',
"base directory for build library"),
]
def initialize_options(self):
self.build_base = os.path.join(os.getenv('VIRTUAL_ENV'), 'build', 'csound')
def finalize_options(self):
pass
@property
def zip_path(self):
return os.path.join(self.build_base, 'csound.zip')
@property
def src_dir(self):
return os.path.join(self.build_base, 'src')
@property
def make_dir(self):
return os.path.join(self.build_base, 'cs6make')
class BuildCSound(CSoundMixin, core.Command):
def run(self):
if not os.path.isdir(self.build_base):
os.makedirs(self.build_base)
self._download_zip(self.zip_path)
self._unpack_zip(self.zip_path, self.src_dir)
self._cmake(self.src_dir, self.make_dir)
self._make(self.make_dir)
def _download_zip(self, zip_path):
if os.path.exists(zip_path):
return
total_bytes = 0
with urllib.request.urlopen(DOWNLOAD_URL) as fp_in:
with open(zip_path + '.partial', 'wb') as fp_out:
last_report = time.time()
try:
while True:
dat = fp_in.read(10240)
if not dat:
break
fp_out.write(dat)
total_bytes += len(dat)
if time.time() - last_report > 1:
sys.stderr.write(
'Downloading %s: %d bytes\r'
% (DOWNLOAD_URL, total_bytes))
sys.stderr.flush()
last_report = time.time()
finally:
sys.stderr.write('\033[K')
sys.stderr.flush()
os.rename(zip_path + '.partial', zip_path)
print('Downloaded %s: %d bytes' % (DOWNLOAD_URL, total_bytes))
def _unpack_zip(self, zip_path, src_dir):
if os.path.isdir(src_dir):
return
print("Extracting...")
base_dir = None
with zipfile.ZipFile(zip_path) as fp:
for path in fp.namelist():
while path:
path, b = os.path.split(path)
if not path:
if base_dir is None:
base_dir = b
elif b != base_dir:
raise RuntimeError(
"No common base dir (%s)" % b)
fp.extractall(self.build_base)
os.rename(os.path.join(self.build_base, base_dir), src_dir)
print("Extracted to %s" % src_dir)
return src_dir
def _cmake(self, src_dir, make_dir):
if os.path.exists(os.path.join(make_dir, 'Makefile')):
return
if not os.path.isdir(make_dir):
os.makedirs(make_dir)
print("Running cmake...")
subprocess.run(
['cmake',
'-DBUILD_PYTHON_INTERFACE=0',
'-DCMAKE_INSTALL_PREFIX=' + os.getenv('VIRTUAL_ENV'),
os.path.abspath(src_dir)
],
cwd=make_dir,
check=True)
def _make(self, make_dir):
if os.path.exists(os.path.join(make_dir, '.build.complete')):
return
print("Running make...")
subprocess.run(
['make', '-j8'],
cwd=make_dir,
check=True)
open(os.path.join(make_dir, '.build.complete'), 'w').close()
class InstallCSound(CSoundMixin, core.Command):
@property
def sentinel_path(self):
return os.path.join(
os.getenv('VIRTUAL_ENV'), '.csound-%s-installed' % VERSION)
def run(self):
if os.path.exists(self.sentinel_path):
return
print("Running make install...")
subprocess.run(
['make', 'install'],
cwd=self.make_dir,
check=True)
open(self.sentinel_path, 'w').close()
def get_outputs(self):
return [self.sentinel_path]
build.sub_commands.append(('build_csound', None))
install.sub_commands.insert(0, ('install_csound', None))
core.setup(
name = 'csound',
version = VERSION,
cmdclass = {
'build_csound': BuildCSound,
'install_csound': InstallCSound,
},
)

169
3rdparty/faust/setup.py vendored

@ -1,169 +0,0 @@
# @begin:license
#
# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# @end:license
from distutils import core
from distutils.command.build import build
from distutils.command.install import install
import urllib.request
import os
import os.path
import subprocess
import sys
import time
import zipfile
VERSION = '2.15.11'
DOWNLOAD_URL = 'https://github.com/grame-cncm/faust/archive/%s.zip' % VERSION
assert os.getenv('VIRTUAL_ENV'), "Not running in a virtualenv."
class FaustMixin(object):
user_options = [
('build-base=', 'b',
"base directory for build library"),
]
def initialize_options(self):
self.build_base = os.path.join(os.getenv('VIRTUAL_ENV'), 'build', 'faust')
def finalize_options(self):
pass
@property
def zip_path(self):
return os.path.join(self.build_base, 'faust-%s.zip' % VERSION)
@property
def src_dir(self):
return os.path.join(self.build_base, 'src-%s' % VERSION)
class BuildFaust(FaustMixin, core.Command):
def run(self):
if not os.path.isdir(self.build_base):
os.makedirs(self.build_base)
self._download_zip(self.zip_path)
self._unpack_zip(self.zip_path, self.src_dir)
self._make(self.src_dir)
def _download_zip(self, zip_path):
if os.path.exists(zip_path):
return
total_bytes = 0
with urllib.request.urlopen(DOWNLOAD_URL) as fp_in:
with open(zip_path + '.partial', 'wb') as fp_out:
last_report = time.time()
try:
while True:
dat = fp_in.read(10240)
if not dat:
break
fp_out.write(dat)
total_bytes += len(dat)
if time.time() - last_report > 1:
sys.stderr.write(
'Downloading %s: %d bytes\r'
% (DOWNLOAD_URL, total_bytes))
sys.stderr.flush()
last_report = time.time()
finally:
sys.stderr.write('\033[K')
sys.stderr.flush()
os.rename(zip_path + '.partial', zip_path)
print('Downloaded %s: %d bytes' % (DOWNLOAD_URL, total_bytes))
def _unpack_zip(self, zip_path, src_dir):
if os.path.isdir(src_dir):
return
print("Extracting...")
base_dir = None
with zipfile.ZipFile(zip_path) as fp:
for path in fp.namelist():
while path:
path, b = os.path.split(path)
if not path:
if base_dir is None:
base_dir = b
elif b != base_dir:
raise RuntimeError(
"No common base dir (%s)" % b)
fp.extractall(self.build_base)
os.rename(os.path.join(self.build_base, base_dir), src_dir)
print("Extracted to %s" % src_dir)
return src_dir
def _make(self, make_dir):
if os.path.exists(os.path.join(make_dir, '.build.complete')):
return
print("Running make...")
subprocess.run(
['make',
'-j8',
'PREFIX=' + os.getenv('VIRTUAL_ENV'),
'compiler'],
cwd=make_dir,
check=True)
open(os.path.join(make_dir, '.build.complete'), 'w').close()
class InstallFaust(FaustMixin, core.Command):
@property
def sentinel_path(self):
return os.path.join(
os.getenv('VIRTUAL_ENV'), '.faust-%s-installed' % VERSION)
def run(self):
if os.path.exists(self.sentinel_path):
return
print("Running make install...")
subprocess.run(
['make',
'PREFIX=' + os.getenv('VIRTUAL_ENV'),
'install'],
cwd=self.src_dir,
check=True)
open(self.sentinel_path, 'w').close()
def get_outputs(self):
return [self.sentinel_path]
build.sub_commands.append(('build_faust', None))
install.sub_commands.insert(0, ('install_faust', None))
core.setup(
name = 'faust',
version = VERSION,
cmdclass = {
'build_faust': BuildFaust,
'install_faust': InstallFaust,
},
)

158
3rdparty/faustlibraries/setup.py vendored

@ -1,158 +0,0 @@
# @begin:license
#
# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# @end:license
from distutils import core
from distutils.command.build import build
from distutils.command.install import install
import urllib.request
import os
import os.path
import shutil
import subprocess
import sys
import time
import zipfile
VERSION = '0.20190330'
COMMIT_ID = '64a57f5693573ed73409f16c0d7ba420cde6111e'
DOWNLOAD_URL = 'https://github.com/grame-cncm/faustlibraries/archive/%s.zip' % COMMIT_ID
assert os.getenv('VIRTUAL_ENV'), "Not running in a virtualenv."
class FaustLibrariesMixin(object):
user_options = [
('build-base=', 'b',
"base directory for build library"),
]
def initialize_options(self):
self.build_base = os.path.join(os.getenv('VIRTUAL_ENV'), 'build', 'faustlibraries')
def finalize_options(self):
pass
@property
def zip_path(self):
return os.path.join(self.build_base, 'faustlibraries-%s.zip' % VERSION)
@property
def src_dir(self):
return os.path.join(self.build_base, 'src-%s' % VERSION)
class BuildFaustLibraries(FaustLibrariesMixin, core.Command):
def run(self):
if not os.path.isdir(self.build_base):
os.makedirs(self.build_base)
self._download_zip(self.zip_path)
self._unpack_zip(self.zip_path, self.src_dir)
def _download_zip(self, zip_path):
if os.path.exists(zip_path):
return
total_bytes = 0
with urllib.request.urlopen(DOWNLOAD_URL) as fp_in:
with open(zip_path + '.partial', 'wb') as fp_out:
last_report = time.time()
try:
while True:
dat = fp_in.read(10240)
if not dat:
break
fp_out.write(dat)
total_bytes += len(dat)
if time.time() - last_report > 1:
sys.stderr.write(
'Downloading %s: %d bytes\r'
% (DOWNLOAD_URL, total_bytes))
sys.stderr.flush()
last_report = time.time()
finally:
sys.stderr.write('\033[K')
sys.stderr.flush()
os.rename(zip_path + '.partial', zip_path)
print('Downloaded %s: %d bytes' % (DOWNLOAD_URL, total_bytes))
def _unpack_zip(self, zip_path, src_dir):
if os.path.isdir(src_dir):
return
print("Extracting...")
base_dir = None
with zipfile.ZipFile(zip_path) as fp:
for path in fp.namelist():
while path:
path, b = os.path.split(path)
if not path:
if base_dir is None:
base_dir = b
elif b != base_dir:
raise RuntimeError(
"No common base dir (%s)" % b)
fp.extractall(self.build_base)
os.rename(os.path.join(self.build_base, base_dir), src_dir)
print("Extracted to %s" % src_dir)
return src_dir
class InstallFaustLibraries(FaustLibrariesMixin, core.Command):
@property
def sentinel_path(self):
return os.path.join(
os.getenv('VIRTUAL_ENV'), '.faustlibraries-%s-installed' % VERSION)
@property
def install_dir(self):
return os.path.join(
os.getenv('VIRTUAL_ENV'), 'share', 'faustlibraries')
def run(self):
if os.path.exists(self.sentinel_path):
return
print("Copy files...")
if os.path.isdir(self.install_dir):
shutil.rmtree(self.install_dir)
shutil.copytree(self.src_dir, self.install_dir)
open(self.sentinel_path, 'w').close()
def get_outputs(self):
return [self.sentinel_path]
build.sub_commands.append(('build_faustlibraries', None))
install.sub_commands.insert(0, ('install_faustlibraries', None))
core.setup(
name = 'faustlibraries',
version = VERSION,
cmdclass = {
'build_faustlibraries': BuildFaustLibraries,
'install_faustlibraries': InstallFaustLibraries,
},
)

219
3rdparty/lilv/setup.py vendored

@ -1,219 +0,0 @@
# @begin:license
#
# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# @end:license
from distutils import core
from distutils.command.build import build
from distutils.command.install import install
import urllib.request
import os
import os.path
import subprocess
import sys
import time
import tarfile
import zipfile
# VERSION = '0.24.0'
# FILENAME = 'lilv-%s.tar.bz2' % VERSION
# DOWNLOAD_URL = 'http://git.drobilla.net/cgit.cgi/lilv.git/snapshot/%s' % FILENAME
VERSION = '0.24.3-git'
FILENAME = 'master.zip'
DOWNLOAD_URL = 'https://github.com/odahoda/lilv/archive/%s' % FILENAME
assert os.getenv('VIRTUAL_ENV'), "Not running in a virtualenv."
class LilvMixin(object):
user_options = [
('build-base=', 'b',
"base directory for build library"),
]
def initialize_options(self):
self.build_base = os.path.join(os.getenv('VIRTUAL_ENV'), 'build', 'lilv')
def finalize_options(self):
pass
@property
def archive_path(self):
return os.path.join(self.build_base, FILENAME)
@property
def src_dir(self):
return os.path.join(self.build_base, 'src')
class BuildLilv(LilvMixin, core.Command):
def run(self):
if not os.path.isdir(self.build_base):
os.makedirs(self.build_base)
self._download_archive(self.archive_path)
self._unpack_archive(self.archive_path, self.src_dir)
self._configure(self.src_dir)
self._build(self.src_dir)
def _download_archive(self, archive_path):
if os.path.exists(archive_path):
return
total_bytes = 0
with urllib.request.urlopen(DOWNLOAD_URL) as fp_in:
with open(archive_path + '.partial', 'wb') as fp_out:
last_report = time.time()
try:
while True:
dat = fp_in.read(10240)
if not dat:
break
fp_out.write(dat)
total_bytes += len(dat)
if time.time() - last_report > 1:
sys.stderr.write(
'Downloading %s: %d bytes\r'
% (DOWNLOAD_URL, total_bytes))
sys.stderr.flush()
last_report = time.time()
finally:
sys.stderr.write('\033[K')
sys.stderr.flush()
os.rename(archive_path + '.partial', archive_path)
print('Downloaded %s: %d bytes' % (DOWNLOAD_URL, total_bytes))
# def _unpack_archive(self, archive_path, src_dir):
# if os.path.isdir(src_dir):
# return
# print("Extracting...")
# base_dir = None
# with tarfile.open(archive_path, 'r:bz2') as fp:
# for path in fp.getnames():
# while path:
# path, b = os.path.split(path)
# if not path:
# if base_dir is None:
# base_dir = b
# elif b != base_dir:
# raise RuntimeError(
# "No common base dir (%s)" % b)
# fp.extractall(self.build_base)
# os.rename(os.path.join(self.build_base, base_dir), src_dir)
# print("Extracted to %s" % src_dir)
# return src_dir
def _unpack_archive(self, archive_path, src_dir):
if os.path.isdir(src_dir):
return
print("Extracting...")
base_dir = None
with zipfile.ZipFile(archive_path, 'r') as fp:
for path in fp.namelist():
while path:
path, b = os.path.split(path)
if not path:
if base_dir is None:
base_dir = b
elif b != base_dir:
raise RuntimeError(
"No common base dir (%s)" % b)
fp.extractall(self.build_base)
os.chmod(os.path.join(self.build_base, base_dir, 'waf'), 0o755)
os.rename(os.path.join(self.build_base, base_dir), src_dir)
print("Extracted to %s" % src_dir)
return src_dir
def _configure(self, src_dir):
if os.path.exists(os.path.join(src_dir, '.configure.complete')):
return
print("Running waf configure...")
subprocess.run(
['./waf',
'configure',
'--prefix=%s' % os.getenv('VIRTUAL_ENV'),
'--bindings',
'--no-utils',
'--no-bash-completion',
'--test',
],
cwd=src_dir,
env=dict(
os.environ,
PKG_CONFIG_PATH=os.path.join(os.getenv('VIRTUAL_ENV'), 'lib', 'pkgconfig')),
check=True)
open(os.path.join(src_dir, '.configure.complete'), 'w').close()
def _build(self, src_dir):
if os.path.exists(os.path.join(src_dir, '.build.complete')):
return
print("Running waf build...")
subprocess.run(
['./waf', 'build'],
cwd=src_dir,
check=True)
open(os.path.join(src_dir, '.build.complete'), 'w').close()
class InstallLilv(LilvMixin, core.Command):
@property
def sentinel_path(self):
return os.path.join(
os.getenv('VIRTUAL_ENV'), '.lilv-%s-installed' % VERSION)
def run(self):
if os.path.exists(self.sentinel_path):
return
print("Running waf install...")
subprocess.run(
['./waf', 'install'],
cwd=self.src_dir,
check=True)
open(self.sentinel_path, 'w').close()
def get_outputs(self):
return [self.sentinel_path]
build.sub_commands.append(('build_lilv', None))
install.sub_commands.insert(0, ('install_lilv', None))
core.setup(
name = 'lilv',
version = VERSION,
cmdclass = {
'build_lilv': BuildLilv,
'install_lilv': InstallLilv,
},
requires=['lv2'],
)

181
3rdparty/lv2/setup.py vendored

@ -1,181 +0,0 @@
# @begin:license
#
# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# @end:license
from distutils import core
from distutils.command.build import build
from distutils.command.install import install
import urllib.request
import os
import os.path
import subprocess
import sys
import time
import tarfile
VERSION = '1.14.0'
FILENAME = 'lv2-%s.tar.xz' % VERSION
DOWNLOAD_URL = 'http://lv2plug.in/git/cgit.cgi/lv2.git/snapshot/%s' % FILENAME
assert os.getenv('VIRTUAL_ENV'), "Not running in a virtualenv."
class Lv2Mixin(object):
user_options = [
('build-base=', 'b',
"base directory for build library"),
]
def initialize_options(self):
self.build_base = os.path.join(os.getenv('VIRTUAL_ENV'), 'build', 'lv2')
def finalize_options(self):
pass
@property
def archive_path(self):
return os.path.join(self.build_base, FILENAME)
@property
def src_dir(self):
return os.path.join(self.build_base, 'src')
class BuildLv2(Lv2Mixin, core.Command):
def run(self):
if not os.path.isdir(self.build_base):
os.makedirs(self.build_base)
self._download_archive(self.archive_path)
self._unpack_archive(self.archive_path, self.src_dir)
self._configure(self.src_dir)
self._make(self.src_dir)
def _download_archive(self, archive_path):
if os.path.exists(archive_path):
return
total_bytes = 0
with urllib.request.urlopen(DOWNLOAD_URL) as fp_in:
with open(archive_path + '.partial', 'wb') as fp_out:
last_report = time.time()
try:
while True:
dat = fp_in.read(10240)
if not dat:
break
fp_out.write(dat)
total_bytes += len(dat)
if time.time() - last_report > 1:
sys.stderr.write(
'Downloading %s: %d bytes\r'
% (DOWNLOAD_URL, total_bytes))
sys.stderr.flush()
last_report = time.time()
finally:
sys.stderr.write('\033[K')
sys.stderr.flush()
os.rename(archive_path + '.partial', archive_path)
print('Downloaded %s: %d bytes' % (DOWNLOAD_URL, total_bytes))
def _unpack_archive(self, archive_path, src_dir):
if os.path.isdir(src_dir):
return
print("Extracting...")
base_dir = None
with tarfile.open(archive_path, 'r:xz') as fp:
for path in fp.getnames():
while path:
path, b = os.path.split(path)
if not path:
if base_dir is None:
base_dir = b
elif b != base_dir:
raise RuntimeError(
"No common base dir (%s)" % b)
fp.extractall(self.build_base)
os.rename(os.path.join(self.build_base, base_dir), src_dir)
print("Extracted to %s" % src_dir)
return src_dir
def _configure(self, src_dir):
if os.path.exists(os.path.join(src_dir, '.configure.complete')):
return
print("Running waf...")
subprocess.run(
['./waf',
'configure',
'--prefix=%s' % os.getenv('VIRTUAL_ENV')
],
cwd=src_dir,
check=True)
open(os.path.join(src_dir, '.configure.complete'), 'w').close()
def _make(self, src_dir):
if os.path.exists(os.path.join(src_dir, '.build.complete')):
return
print("Running make...")
subprocess.run(
['./waf'],
cwd=src_dir,
check=True)
open(os.path.join(src_dir, '.build.complete'), 'w').close()
class InstallLv2(Lv2Mixin, core.Command):
@property
def sentinel_path(self):
return os.path.join(
os.getenv('VIRTUAL_ENV'), '.lv2-%s-installed' % VERSION)
def run(self):
if os.path.exists(self.sentinel_path):
return
print("Running make install...")
subprocess.run(
['./waf', 'install'],
cwd=self.src_dir,
check=True)
open(self.sentinel_path, 'w').close()
def get_outputs(self):
return [self.sentinel_path]
build.sub_commands.append(('build_lv2', None))
install.sub_commands.insert(0, ('install_lv2', None))
core.setup(
name = 'lv2',
version = VERSION,
cmdclass = {
'build_lv2': BuildLv2,
'install_lv2': InstallLv2,
},
)

191
3rdparty/protoc/setup.py vendored

@ -1,191 +0,0 @@
# @begin:license
#
# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# @end:license
from distutils import core
from distutils.command.build import build
from distutils.command.install import install
import urllib.request
import os
import os.path
import subprocess
import sys
import time
import zipfile
VERSION = '3.7.1'
FILENAME = 'v%s.zip' % VERSION
DOWNLOAD_URL = 'https://github.com/google/protobuf/archive/%s' % FILENAME
assert os.getenv('VIRTUAL_ENV'), "Not running in a virtualenv."
class ProtocMixin(object):
user_options = [
('build-base=', 'b',
"base directory for build library"),
]
def initialize_options(self):
self.build_base = os.path.join(os.getenv('VIRTUAL_ENV'), 'build', 'protoc')
def finalize_options(self):
pass
@property
def archive_path(self):
return os.path.join(self.build_base, FILENAME)
@property
def src_dir(self):
return os.path.join(self.build_base, 'src')
class BuildProtoc(ProtocMixin, core.Command):
def run(self):
if not os.path.isdir(self.build_base):
os.makedirs(self.build_base)
self._download_archive(self.archive_path)
self._unpack_archive(self.archive_path, self.src_dir)
self._configure(self.src_dir)
self._build(self.src_dir)
def _download_archive(self, archive_path):
if os.path.exists(archive_path):
return
total_bytes = 0
with urllib.request.urlopen(DOWNLOAD_URL) as fp_in:
with open(archive_path + '.partial', 'wb') as fp_out:
last_report = time.time()
try:
while True:
dat = fp_in.read(10240)
if not dat:
break
fp_out.write(dat)
total_bytes += len(dat)
if time.time() - last_report > 1:
sys.stderr.write(
'Downloading %s: %d bytes\r'
% (DOWNLOAD_URL, total_bytes))
sys.stderr.flush()
last_report = time.time()
finally:
sys.stderr.write('\033[K')
sys.stderr.flush()
os.rename(archive_path + '.partial', archive_path)
print('Downloaded %s: %d bytes' % (DOWNLOAD_URL, total_bytes))
def _unpack_archive(self, archive_path, src_dir):
if os.path.isdir(src_dir):
return
print("Extracting...")
base_dir = None
with zipfile.ZipFile(archive_path, 'r') as fp:
for path in fp.namelist():
while path:
path, b = os.path.split(path)
if not path:
if base_dir is None:
base_dir = b
elif b != base_dir:
raise RuntimeError(
"No common base dir (%s)" % b)
fp.extractall(self.build_base)
os.rename(os.path.join(self.build_base, base_dir), src_dir)
print("Extracted to %s" % src_dir)
return src_dir
def _configure(self, src_dir):
if os.path.exists(os.path.join(src_dir, '.configure.complete')):
return
print("Running autogen...")
subprocess.run(
['bash', 'autogen.sh'],
cwd=src_dir,
env=dict(
os.environ,
PKG_CONFIG_PATH=os.path.join(os.getenv('VIRTUAL_ENV'), 'lib', 'pkgconfig')),
check=True)
print("Running configure...")
subprocess.run(
['./configure',
'--prefix=%s' % os.getenv('VIRTUAL_ENV'),
],
cwd=src_dir,
env=dict(
os.environ,
PKG_CONFIG_PATH=os.path.join(os.getenv('VIRTUAL_ENV'), 'lib', 'pkgconfig')),
check=True)
open(os.path.join(src_dir, '.configure.complete'), 'w').close()
def _build(self, src_dir):
if os.path.exists(os.path.join(src_dir, '.build.complete')):
return
print("Running make...")
subprocess.run(
['make', '-j8'],
cwd=src_dir,
check=True)
open(os.path.join(src_dir, '.build.complete'), 'w').close()
class InstallProtoc(ProtocMixin, core.Command):
@property
def sentinel_path(self):
return os.path.join(
os.getenv('VIRTUAL_ENV'), '.protoc-%s-installed' % VERSION)
def run(self):
if os.path.exists(self.sentinel_path):
return
print("Running make install...")
subprocess.run(
['make', 'install'],
cwd=self.src_dir,
check=True)
open(self.sentinel_path, 'w').close()
def get_outputs(self):
return [self.sentinel_path]
build.sub_commands.append(('build_protoc', None))
install.sub_commands.insert(0, ('install_protoc', None))
core.setup(
name = 'protoc',
version = VERSION,
cmdclass = {
'build_protoc': BuildProtoc,
'install_protoc': InstallProtoc,
},
)

184
3rdparty/suil/setup.py vendored

@ -1,184 +0,0 @@
# @begin:license
#
# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# @end:license
from distutils import core
from distutils.command.build import build
from distutils.command.install import install
import urllib.request
import os
import os.path
import subprocess
import sys
import time
import tarfile
VERSION = '0.10.0'
FILENAME = 'suil-%s.tar.bz2' % VERSION
DOWNLOAD_URL = 'http://git.drobilla.net/cgit.cgi/suil.git/snapshot/%s' % FILENAME
assert os.getenv('VIRTUAL_ENV'), "Not running in a virtualenv."
class SuilMixin(object):
user_options = [
('build-base=', 'b',
"base directory for build library"),
]
def initialize_options(self):
self.build_base = os.path.join(os.getenv('VIRTUAL_ENV'), 'build', 'suil')
def finalize_options(self):
pass
@property
def archive_path(self):
return os.path.join(self.build_base, FILENAME)
@property
def src_dir(self):
return os.path.join(self.build_base, 'src')
class BuildSuil(SuilMixin, core.Command):
def run(self):
if not os.path.isdir(self.build_base):
os.makedirs(self.build_base)
self._download_archive(self.archive_path)
self._unpack_archive(self.archive_path, self.src_dir)
self._configure(self.src_dir)
self._build(self.src_dir)
def _download_archive(self, archive_path):
if os.path.exists(archive_path):
return
total_bytes = 0
with urllib.request.urlopen(DOWNLOAD_URL) as fp_in:
with open(archive_path + '.partial', 'wb') as fp_out:
last_report = time.time()
try:
while True:
dat = fp_in.read(10240)
if not dat:
break
fp_out.write(dat)
total_bytes += len(dat)
if time.time() - last_report > 1:
sys.stderr.write(
'Downloading %s: %d bytes\r'
% (DOWNLOAD_URL, total_bytes))
sys.stderr.flush()
last_report = time.time()
finally:
sys.stderr.write('\033[K')
sys.stderr.flush()
os.rename(archive_path + '.partial', archive_path)
print('Downloaded %s: %d bytes' % (DOWNLOAD_URL, total_bytes))
def _unpack_archive(self, archive_path, src_dir):
if os.path.isdir(src_dir):
return
print("Extracting...")
base_dir = None
with tarfile.open(archive_path, 'r:bz2') as fp:
for path in fp.getnames():
while path:
path, b = os.path.split(path)
if not path:
if base_dir is None:
base_dir = b
elif b != base_dir:
raise RuntimeError(
"No common base dir (%s)" % b)
fp.extractall(self.build_base)
os.rename(os.path.join(self.build_base, base_dir), src_dir)
print("Extracted to %s" % src_dir)
return src_dir
def _configure(self, src_dir):
if os.path.exists(os.path.join(src_dir, '.configure.complete')):
return
print("Running waf configure...")
subprocess.run(
['./waf',
'configure',
'--prefix=%s' % os.getenv('VIRTUAL_ENV'),
],
cwd=src_dir,
env=dict(
os.environ,
PKG_CONFIG_PATH=os.path.join(os.getenv('VIRTUAL_ENV'), 'lib', 'pkgconfig')),
check=True)
open(os.path.join(src_dir, '.configure.complete'), 'w').close()
def _build(self, src_dir):
if os.path.exists(os.path.join(src_dir, '.build.complete')):
return
print("Running waf build...")
subprocess.run(
['./waf', 'build'],
cwd=src_dir,
check=True)
open(os.path.join(src_dir, '.build.complete'), 'w').close()
class InstallSuil(SuilMixin, core.Command):
@property
def sentinel_path(self):
return os.path.join(
os.getenv('VIRTUAL_ENV'), '.suil-%s-installed' % VERSION)
def run(self):
if os.path.exists(self.sentinel_path):
return
print("Running waf install...")
subprocess.run(
['./waf', 'install'],
cwd=self.src_dir,
check=True)
open(self.sentinel_path, 'w').close()
def get_outputs(self):
return [self.sentinel_path]
build.sub_commands.append(('build_suil', None))
install.sub_commands.insert(0, ('install_suil', None))
core.setup(
name = 'suil',
version = VERSION,
cmdclass = {
'build_suil': BuildSuil,
'install_suil': InstallSuil,
},
requires=['lv2'],
)

170
CMakeLists.txt

@ -1,170 +0,0 @@
# @begin:license
#
# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT