summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2016-10-05 16:07:02 -0700
committerBrian Dolbec <dolsen@gentoo.org>2016-10-07 11:11:12 -0700
commit7b38d796995f1976adaee32425c058d2bdfcb312 (patch)
treed4df4a19092bb868a04ac4c67769b42e32f04dff /dev-python/twisted/files
parentdev-python/priority: New package, new dep of twisted (diff)
downloadgentoo-7b38d796995f1976adaee32425c058d2bdfcb312.tar.gz
gentoo-7b38d796995f1976adaee32425c058d2bdfcb312.tar.bz2
gentoo-7b38d796995f1976adaee32425c058d2bdfcb312.zip
dev-python/twisted: New monolithic release twisted package
Twisted has changed to a single release pkg. This new pkg. now has python3 support. Package-Manager: portage-2.3.1_p8
Diffstat (limited to 'dev-python/twisted/files')
-rw-r--r--dev-python/twisted/files/twistd.conf7
-rw-r--r--dev-python/twisted/files/twistd.init25
-rw-r--r--dev-python/twisted/files/twisted-core-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch11
3 files changed, 43 insertions, 0 deletions
diff --git a/dev-python/twisted/files/twistd.conf b/dev-python/twisted/files/twistd.conf
new file mode 100644
index 000000000000..53788cd0017e
--- /dev/null
+++ b/dev-python/twisted/files/twistd.conf
@@ -0,0 +1,7 @@
+
+# These are passed to twistd.
+# TWISTD_OPTS="--no_save --logfile=/var/log/twistd -y /etc/twistd.tac"
+# TWISTD_OPTS="--no_save --logfile=/var/log/twistd -f /etc/twistd.tap"
+
+# Make any additions to PYTHONPATH the twistd needs here.
+# PYTHONPATH="/path/to/extra/python/modules"
diff --git a/dev-python/twisted/files/twistd.init b/dev-python/twisted/files/twistd.init
new file mode 100644
index 000000000000..b031b0020c6e
--- /dev/null
+++ b/dev-python/twisted/files/twistd.init
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+
+depend() {
+ need net
+}
+
+start() {
+ if [ -z "${TWISTD_OPTS}" ]; then
+ eerror "TWISTD_OPTS is not set!"
+ eerror "You need to configure twistd in /etc/conf.d/twistd."
+ return 1
+ fi
+ export PYTHONPATH
+ ebegin "Starting twistd"
+ start-stop-daemon --start --quiet --pidfile /var/run/twistd.pid \
+ --exec /usr/bin/twistd -- --pidfile /var/run/twistd.pid \
+ ${TWISTD_OPTS}
+ eend $? "Failed to start twistd"
+}
+
+stop() {
+ ebegin "Stopping twistd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/twistd.pid
+ eend $? "Failed to stop twistd"
+}
diff --git a/dev-python/twisted/files/twisted-core-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch b/dev-python/twisted/files/twisted-core-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch
new file mode 100644
index 000000000000..2fe22f1640b1
--- /dev/null
+++ b/dev-python/twisted/files/twisted-core-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch
@@ -0,0 +1,11 @@
+--- twisted/plugin.py
++++ twisted/plugin.py
+@@ -174,7 +174,7 @@
+ if pluginKey not in existingKeys:
+ del dropinDotCache[pluginKey]
+ needsWrite = True
+- if needsWrite:
++ if needsWrite and os.environ.get("TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE") is None:
+ try:
+ dropinPath.setContent(pickle.dumps(dropinDotCache))
+ except: