Skip to content

Instantly share code, notes, and snippets.

from devpi_server.filestore import FileEntry
from devpi_server.main import get_pluginmanager
from devpi_server.main import _main
from pluggy import HookimplMarker
import sys
hookimpl = HookimplMarker("devpiserver")
MIT License
Copyright (c) 2020 Florian Schulze
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
from devpi_server.log import threadlog as log
from devpi_server.main import get_pluginmanager
from devpi_server.main import _main
import sys
def main():
pm = get_pluginmanager()
pm.register(Plugin())
_main(pm, sys.argv)
from devpi_common.types import ensure_unicode
from devpi_server.log import threadlog as log
from devpi_server.main import get_pluginmanager
from devpi_server.main import _main
from devpi_web.indexing import preprocess_project
from devpi_web.main import get_indexer
import sys
import time
from devpi_server.main import get_pluginmanager
from devpi_server.main import _main
import sys
def main():
pm = get_pluginmanager()
pm.register(Plugin())
_main(pm, sys.argv)
@fschulze
fschulze / .coveragerc
Last active July 15, 2018 06:24
coverage.py issue #678
[run]
plugins =
chameleon_coverage_plugin
@fschulze
fschulze / devpi-pypi-warehouse.sh
Created March 18, 2018 11:03
Create a devpi index for the new pypi.org (Warehouse)
devpi index -c root/warehouse type=mirror "mirror_web_url_fmt=https://pypi.org/project/{name}/" "mirror_url=https://pypi.org/simple/" title=Warehouse
# run in a temporary folder to list 32 bit only iOS apps from your iTunes Library
from glob import glob
import os
import plistlib
import subprocess
import textwrap
import zipfile
ipas = glob(os.path.expanduser('~/Music/iTunes/Mobile Applications/*.ipa'))
@fschulze
fschulze / failed_tests
Created October 31, 2016 13:44
Filters failed tests from zope.testrunner output to be suitable for ```-t $(failed_tests)```
#!/usr/bin/env python
import subprocess
def get_tests_from_paste_buffer():
return subprocess.check_output('pbpaste')
def run():
raw_tests = get_tests_from_paste_buffer()
from pkg_resources import resource_filename
from pyramid.events import subscriber
from pyramid.events import BeforeRender
def devpiserver_cmdline_run(xom):
# this is slightly hacky, because accessing the command line args like that
# is not part of the official API, but this is just for convenience
if xom.config.args.theme is None:
xom.config.args.theme = resource_filename('devpi_example_theme', 'theme')