add requirements-dev.txt

lists all requirements that are necessary to run ./test.sh
so that someone can create a virtualenv and run `pip install
-r requirements-dev.txt`
Merge pull request #62 from mfussenegger/requirements

add requirements-dev.txt
reorganize scripts/ directory

Summary:
This is a cosmetic change and moves some more "targeted" scripts to specific
directories. It also pairs Windows-specific scripts with their Posix
counterparts.

Reviewers: jacko

Reviewed By: jacko

Differential Revision: https://phabricator.buildinspace.com/D138
stop claiming that git submodules break bisect

Summary:
If a peru project doesn't put `peru sync` inside its build tools (or if
it has no other build tool), the user still needs to call it in every
step of a bisect, or after a checkout. In this way, it's no better than
`git submodule update`. There maybe be a point about it being more
appropriate for Make to call peru than for it to call git, but I'm not
really sure. Let's just take this part out of the readme.

See: https://www.reddit.com/r/vim/comments/2o6av8/peru_pathogen_a_new_alternative_to_plugin/cmlc4l0

Closes https://github.com/buildinspace/peru/issues/64.

Reviewers: sean

Reviewed By: sean

Differential Revision: https://phabricator.buildinspace.com/D137
fix the travis build

Summary: We forgot to point .travis.yml to the new test script name.

Test Plan: Pushed a branch to my fork.

Reviewers: sean

Differential Revision: https://phabricator.buildinspace.com/D140
create docs/architecture.md

Summary:
A first shot at documenting how peru works internally, particularly the
plugin interface.

Reviewers: sean

Reviewed By: sean

Differential Revision: https://phabricator.buildinspace.com/D139
clean up the summary text a little

Summary: Looking at them now, some of the help summaries are confusing.

Reviewers: sean

Reviewed By: sean

Differential Revision: https://phabricator.buildinspace.com/D142
support user-defined plugins

Summary:
Add search directories for plugins. On Linux/Mac we use:

1. `$XDG_CONFIG_HOME/peru/plugins`
2. `/usr/local/lib/peru/plugins`
3. `/usr/lib/peru/plugins`

And on Windows it's:

1. `%LOCALAPPDATA%\peru\plugins`
2. `%PROGRAMFILES%\peru\plugins`

Get rid of the old rule that says you can't override existing plugins --
that was from back when we allowed individual projects to provide their
own plugins, which we no longer do.

Test Plan:
We had some old testing logic for custom plugin paths, even though that
feature had been mostly removed. Repurpose that test to load plugins
from a fake home directory. Manually test on Windows.

Reviewers: sean

Reviewed By: sean

Differential Revision: https://phabricator.buildinspace.com/D141
handle quotes in Content-Disposition filenames

Summary:
The HTTP standard specifies
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) that
`Content-Disposition` filenames can be quoted. I forgot to handle that.

Closes https://github.com/buildinspace/peru/issues/70.

Test Plan: Add a couple extra cases to the existing test.

Reviewers: sean

Reviewed By: sean

Differential Revision: https://phabricator.buildinspace.com/D144
reimplement shared bash scripts in python

Summary:
We have peru.sh and peru.bat, and also test.sh and test.bat. Rather than
maintaining both of those duplicates to support Windows, just
reimplement them in Python.

There's also validate-third-party.sh, but we never really use that on
Windows. We can port it in a later diff if we feel like it.

Test Plan:
Check that tests actually fail after introducing a bug. (To make sure
we're not actually testing the installed version instead of the repo
version.) Check that the linter fails after dirtying up some code. Check
that the untracked file test fails by creating a random file during
tests.

Reviewers: sean

Reviewed By: sean

Differential Revision: https://phabricator.buildinspace.com/D143
stop LocalModule from creating a .peru dir by default

Summary:
Instead, only create the dir when we need to actually write a
`lastimports` file. This is a short term fix for our parser tests
inadvertently creating a `.peru` directory in our tests dir. With this
fix, D145 should be able to remove `.peru` from our `.gitignore` file.

In the long term, it's clear that we have an organization problem. The
parser should obviously not be calling code that writes to disk. I think
the best solution will be to tear up the LocalModule class. It's a
holdover from when we thought we would be doing much more complicated
things to override dirs, like applying imports and running build
commands. Going forward, override dirs are going to be a much simpler
concept, and we can probably separate the parser from the code that
deals with the local project dir in the process of simplifying it.

Tracking issue: https://github.com/buildinspace/peru/issues/72

Test Plan:
`arc patch D145`, remove `.peru` from `.gitignore`, clean the repo, and
run tests. Tests pass without any warning about dirty files.

Reviewers: sean

Reviewed By: sean

Differential Revision: https://phabricator.buildinspace.com/D146
remove third-party/

Summary:
Remove the third-party/ directory and no longer rely on copies of dependencies
in the repo. When needed, fetch dependencies normally. This can usually be
accomplished via `pip install -r requirements.txt` or `pip install -r
requirements-dev.txt`.

Even though `peru.yaml` is gone, `.peru/` is still in `.gitignore`, because the
tests check for untracked files and will detect `.peru/` as an error.

Test Plan: Successfully ran tests locally and via Travis CI.

Reviewers: jacko

Reviewed By: jacko

Differential Revision: https://phabricator.buildinspace.com/D145
packaging for Debian and Ubuntu

Summary:
Add Debian packaging metadata and a script to generate a basic source package
that can be uploaded to a Launchpad PPA.

Reviewers: jacko

Reviewed By: jacko

Differential Revision: https://phabricator.buildinspace.com/D133
update README

Summary:
Get rid of the separate install instructions for python3.3, and add
links at the bottom.

Reviewers: sean

Reviewed By: sean

Differential Revision: https://phabricator.buildinspace.com/D149
add a description in setup.py

Reviewers: sean

Reviewed By: sean

Differential Revision: https://phabricator.buildinspace.com/D148
have setup.py inspect the python version to determine dependencies

Summary:
Our Arch package is broken because it doesn't install asyncio and
pathlib. These shouldn't *need* to be installed, because Arch is running
Python 3.4, but the executable script that setup.py generates is getting
confused. It seems like the right thing to do is to make sure these
extra dependencies never make it into our `install_requires` list in
Python 3.4. I *think* the fact that our setup.py ends up in the source
distribution means that `pip install peru` will still do the right thing
for Python 3.3.

Test Plan: Tested `pip install .` in a python3.3 virtualenv.

Reviewers: sean

Reviewed By: sean

Differential Revision: https://phabricator.buildinspace.com/D151
bump version to 0.1.2

Summary:
Important changes in this release:
- fix curl plugin's quote handling (D144)
- support user-defined plugins (D141)

Reviewers: sean

Reviewed By: sean

Differential Revision: https://phabricator.buildinspace.com/D147