Skip to content

Instantly share code, notes, and snippets.

@markmevans
markmevans / build_specific_plugins.py
Created February 19, 2014 23:57
A hack for PyBuilder build.py files to import support code and/or build specific plugins without cluttering the project's root directory.
# Add the following to the top of your build.py file:
import sys
sys.path.insert(0, 'bldsup') # Project subdirectory for build specific extensions.
@markmevans
markmevans / sdist_hack.py
Created February 11, 2014 00:13
A hack for PyBuilder build.py files so `pyb publish` will work in a filesystem that does not support hardlinks (like VirtualBox shared filesystems.)
#
# Hack the distutils_plugin's SETUP_TEMPLATE to disable hardlinks.
#
import string
from pybuilder.core import init
from pybuilder.plugins.python import distutils_plugin
SDIST_MONKEY_PATCH = """
# sdist_hack: Remove reference to os.link to disable using hardlinks when
@markmevans
markmevans / flake8.xml
Last active August 29, 2015 13:55 — forked from stantonk/flake8.xml
<!-- Drop this in ~/Library/Preferences/PyCharm30/tools -->
<!-- make sure you set the path to flake8 executable for your machine in the COMMAND option -->
<!-- $ git clone git@github.com:8696627.git flake8.xml -->
<toolSet name="Flake8">
<tool name="Flake8 File" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="true" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="/usr/local/bin/flake8" />
<option name="PARAMETERS" value="--max-line-length=80 $FileDir$/$FileName$" />
<option name="WORKING_DIRECTORY" value="$FileDir$" />
</exec>