summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorJohn Turner <jturner.usa@gmail.com>2025-09-11 01:36:58 -0400
committerJohn Turner <jturner.usa@gmail.com>2025-09-11 01:51:15 -0400
commit4db4e81162421e881d2b63402719da4480357952 (patch)
tree1853f1597dd8108a239eaddee1841fe22ffcdb67 /meson.build
parent76c05a62b65c350b97c063cf75523546af7879d5 (diff)
downloadpypaste-4db4e81162421e881d2b63402719da4480357952.tar.gz
rewrite meson.build file to handle installing just the client or server
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build50
1 files changed, 40 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index 7c9ab84..bdb645f 100644
--- a/meson.build
+++ b/meson.build
@@ -1,15 +1,41 @@
-project('paste')
+project('pypaste')
-python = import('python').find_installation(
- modules: ['pygments', 'zstandard', 'aiohttp', 'bozo4'],
-)
+sources = files('pypaste/__init__.py')
+
+modules = []
+
+if get_option('client').enabled()
+ sources += files(
+ 'pypaste/client/__init__.py',
+ 'pypaste/client/__main__.py',
+ 'pypaste/client/plugins/__init__.py',
+ 'pypaste/client/plugins/zen/__init__.py',
+ 'pypaste/client/plugins/pgz/__init__.py'
+ )
+
+ modules += ['requests']
+endif
-sources = files(
- 'pypaste/__init__.py',
- 'pypaste/__main__.py',
- 'pypaste/s3/__init__.py',
- 'pypaste/s3/bucket.py',
- 'pypaste/sqlite/__init__.py',
+if get_option('server').enabled()
+ sources += files(
+ 'pypaste/server/__init__.py',
+ 'pypaste/server/__main__.py',
+ 'pypaste/server/s3/__init__.py',
+ 'pypaste/server/s3/bucket.py',
+ 'pypaste/server/sqlite/__init__.py'
+ )
+
+ modules += [
+ 'aiohttp',
+ 'aiosqlite',
+ 'zstandard',
+ 'pygments',
+ 'bozo4'
+ ]
+endif
+
+python = import('python').find_installation(
+ modules: modules
)
python.install_sources(sources, preserve_path: true)
@@ -18,3 +44,7 @@ install_data(
'eff_large_wordlist.txt',
install_dir: get_option('datadir') / 'dict',
)
+
+# Local Variables:
+# eval: (remove-hook 'before-save-hook 'fmt-current-buffer t)
+# End: