Commit Graph

638 Commits

Author SHA1 Message Date
Jack O'Connor 901aa10dcb add a README badge for GitHub Actions 2020-12-16 19:11:55 -05:00
Jack O'Connor 4eac813b81 configure GitHub Actions CI testing 2020-12-16 19:07:31 -05:00
Jack O'Connor 6bb0b4ce25 fix `peru sync` ignoring missing files when invoked from a subdir
Fixes https://github.com/buildinspace/peru/issues/210.
2020-12-16 17:37:07 -05:00
Jack O'Connor 7322dcd6c6 add a failing test for restoring missing files from a subdir
Reported by @Tweakbert at
https://github.com/buildinspace/peru/issues/210.
2020-12-01 12:26:27 -05:00
Jack O'Connor f79fc40812 wording fix 2020-10-01 14:13:34 -04:00
Jack O'Connor 9258b57310 explicitly document the execution order of rule fields 2020-10-01 14:01:29 -04:00
Jack O'Connor 6cb15c9b3e stop ignoring Python nightly test results on Travis
The pyflakes issue that we were ignoring seems to have been fixed.
2020-07-21 12:27:55 -04:00
Jack O'Connor c3700f2c3f enable Python 3.9 testing on Travis 2020-07-21 12:23:26 -04:00
Jack O'Connor 6a92bd9fa7 allow nightly tests to fail
Currently the pyflakes linter is failing on nightly, which isn't
something worth failing over.

See https://travis-ci.org/github/buildinspace/peru/jobs/665001451.
2020-03-20 16:06:36 -04:00
Jack O'Connor 9b661ebc41 add CI testing for Python 3.7 and 3.8 2020-03-20 15:56:06 -04:00
Jack O'Connor 95e34234b7 remove the reference to the Ubuntu PPA from the README
It's been unmaintained for a while.
2020-03-20 15:53:24 -04:00
Jack O'Connor 76e4012c6c update the release instructions 2018-12-22 12:45:30 -06:00
Jack O'Connor 0596b8278b bump version to 1.2.0
Changes since 1.1.4:
- Removed support for Python 3.3 and 3.4, since the legacy async syntax
  that those versions required on is deprecated.
- Fixed a bug related to git submodules with relative URLs.
2018-12-22 12:32:28 -06:00
Jack O'Connor 07da066082 add support for relative submodule paths
Fixes https://github.com/buildinspace/peru/issues/200.
2018-12-20 00:13:26 +01:00
Jack O'Connor 7fb367bc95 a few more yapf tweaks 2018-12-19 17:36:25 +01:00
Jack O'Connor 5ac520e9fb mention the Python 3.5 requirement in the README 2018-10-03 17:55:35 -04:00
Jack O'Connor a1c76d7c3f update .travis.yml and appveyor.yml 2018-10-03 16:07:15 -04:00
Jack O'Connor 0e9194f8ce add the AsyncExitStack backport, to restore support for Python 3.5 and 3.6 2018-10-03 15:53:44 -04:00
Jack O'Connor f2ab34e5ff clean up formatting with yapf 2018-10-03 15:53:44 -04:00
Jack O'Connor 42e5dfdc4e fix deprecation warnings and drop support for Python 3.3 and 3.4 2018-10-03 15:53:44 -04:00
Jack O'Connor 42ad4ad5ea update the release instructions 2018-07-19 01:27:35 -04:00
Jack O'Connor 2414a4a883 bump version to 1.1.4
Changes since 1.1.3:
- Fixed several bugs around path names that start with a colon. See
  https://github.com/buildinspace/peru/issues/190.
2018-07-19 01:08:19 -04:00
Jack O'Connor e46ea5c8c3 avoid using colons in filepaths in Windows tests 2018-07-18 17:06:31 -04:00
Jack O'Connor ea25e47c9f pull in an appveyor.yml fix
See https://github.com/ogrisel/python-appveyor-demo/pull/46.
2018-07-18 16:45:20 -04:00
Jack O'Connor c972dd4a71 avoid interpreting leading colons in git pathspecs 2018-07-18 16:31:16 -04:00
Jack O'Connor 391f18cdc5 add a PyPI badge to the README 2017-12-01 00:07:32 -05:00
Jack O'Connor b80e0b3c45 bump version to 1.1.3
Changes since 1.1.2:
- Errors in the curl module are less spammy.
- The reup command prints the module as context for errors.
- Use fastentrypoints.py to fix slow startup times in generated scripts.
2017-11-30 23:16:46 -05:00
Jack O'Connor ba92556d0e add fastentrypoints.py to avoid generating slow executables 2017-11-30 23:10:38 -05:00
Jack O'Connor 8b427fe432 get rid of bare except in the plugins
In these two cases, we were actually catching the BaseException that
comes out of sys.exit. The result was correct, but embarrassing.
2017-11-30 20:57:22 -05:00
Jack O'Connor 7e5873d336 git rid of most of the bare excepts 2017-11-30 01:28:17 -05:00
Jack O'Connor 542671b4c5 make sure exit codes get propagated through peru.py and __main__.py 2017-11-30 01:10:27 -05:00
Jack O'Connor 967af6f048 catch HTTPError and URLError in the curl plugin 2017-11-30 01:05:42 -05:00
Jack O'Connor aa6fc754b8 add error_context to reup 2017-11-30 01:05:42 -05:00
Jack O'Connor 1610b466d8 bump version to 1.1.2
Changes:
- `python3 -m peru` is now supported.
- `python3 -m peru.main` is no longer supported.
2017-03-30 11:09:36 -04:00
Jack O'Connor 0c4f8e9ff4 delete the original __main__ clause
It doesn't make sense to have two ways to invoke the same module, if we
can avoid it. I'm not aware of anyone relying on `python -m peru.main`
in the wild, but we can revert this if it ends up causing trouble.
2017-03-30 11:05:27 -04:00
Ed Brannin eba96e62db Fix Flake8 "peru/__main__.py:3:1: W391 blank line at end of file" 2017-03-29 17:45:38 -04:00
Ed Brannin ab762b49fd Run peru with `python -m peru` (python -m peru.main still works too)
This helps recover from "My Python 2&3 got mixed up on Windows!"
in the least surprising way.  I'm already used to `py -3 -m pip ...`
but I never thought to check for some longer module-name
to run for peru.

I'm not aware of any downside to having this file.
Please feel free to prove me wrong. :)

Fix #176
2017-03-29 17:02:49 -04:00
Jack O'Connor bb9396e9f1 bump version to 1.1.1
Fixes:
- https://github.com/buildinspace/peru/pull/173 fixed
  https://github.com/buildinspace/peru/issues/175, a bad state peru
  would get into if git was not installed.
- lint fixes for Python 3.6
2017-03-27 09:05:06 -04:00
Jack O'Connor a05629d0ed Merge pull request #173 from edbrannin/use-contrib-makedirs
Use contrib.makedirs instead of os.makedirs in cache.py
2017-03-10 16:30:54 -05:00
Ed Brannin 68350691b6 Remove a now-unnecessary "if os.path.exists()" 2017-03-10 13:17:52 -05:00
Jack O'Connor 91c5910fc6 Merge pull request #174 from edbrannin/ignore-build-and-dist
Ignore build/ & dist/
2017-03-10 13:14:23 -05:00
Jack O'Connor 22128cf572 use isdir instead of exists in makedirs 2017-03-10 13:10:29 -05:00
Ed Brannin 5e137df7fb Ignore build/ & dist/
(Some projects prefer to leave this up to individual global-ignore
files, but I noticed you're also ignoring *.pyc so it might be OK.)
2017-03-10 13:03:45 -05:00
Ed Brannin b7b82578be Use contrib.makedirs instead of os.makedirs in cache.py
Probably only the first of these is needed, because it was
guarding os.makedirs(path) against os.path.exists(path / 'HEAD').

This was causing an error on Windows:

```
C:\dev\dotfiles>peru sync
Traceback (most recent call last):
  File "C:\Python36\Scripts\peru-script.py", line 11, in <module>
    load_entry_point('peru==1.1.0', 'console_scripts', 'peru')()
  File "C:\Python36\lib\site-packages\peru\main.py", line 363, in main
    runtime = async.run_task(Runtime(args, env))
  File "C:\Python36\lib\site-packages\peru\async.py", line 29, in run_task
    return asyncio.get_event_loop().run_until_complete(coro)
  File "C:\Python36\lib\asyncio\base_events.py", line 466, in run_until_complete
    return future.result()
  File "C:\Python36\lib\site-packages\peru\runtime.py", line 20, in Runtime
    yield from r._init_cache()
  File "C:\Python36\lib\site-packages\peru\runtime.py", line 63, in _init_cache
    self.cache = yield from cache.Cache(self.cache_dir)
  File "C:\Python36\lib\site-packages\peru\cache.py", line 251, in Cache
    yield from cache._init_trees()
  File "C:\Python36\lib\site-packages\peru\cache.py", line 270, in _init_trees
    os.makedirs(self.trees_path)
  File "C:\Python36\lib\os.py", line 220, in makedirs
    mkdir(name, mode)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\dev\\dotfiles\\.peru\\cache\\trees'
```
2017-03-10 13:01:14 -05:00
Jack O'Connor 6b7f2fa81d add the Python 3.6 build to Travis 2017-01-31 12:34:59 -05:00
Jack O'Connor fc359fbbb2 clean up an invalid escape sequence
Invalid escapes like '\s' used to silently turn into a literal '\s', but
in Python 3.6 they became a deprecation warning, and eventually they'll
be an error.
2017-01-31 12:25:27 -05:00
Jack O'Connor 07ee24b9f5 rename async.py to async_helpers.py
Using "async" as a name was deprecated in Python 3.6, and will be an
error in Python 3.7.
2017-01-31 12:19:44 -05:00
Jack O'Connor 9be8463bc3 lint fixes 2017-01-31 12:13:18 -05:00
Jack O'Connor adfbd194f6 clean up the FancyDisplay a bit 2017-01-31 12:10:50 -05:00
Jack O'Connor faf2e348ac bump version to 1.1.0
Changes since 1.0.1:
- Added the `peru module list` command.
- Added --json to that command, and to `peru override list`.
2016-10-28 14:28:42 -04:00