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
This commit is contained in:
Brian Dolbec
2016-10-05 16:07:02 -07:00
parent 8b8f631701
commit 7b38d79699
7 changed files with 341 additions and 0 deletions

View File

@@ -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"

View File

@@ -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"
}

View File

@@ -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: