Commit Graph

615 Commits

Author SHA1 Message Date
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
Jack O'Connor 218c177d95 add the --json flag to `peru module list`
Also add some basic tests.
2016-10-28 14:27:41 -04:00
Jack O'Connor 109a6f31a3 fix a lint error 2016-10-07 17:51:15 -04:00
Jack O'Connor 8e6f7d97f9 Merge remote-tracking branch 'origin/module-list' 2016-10-07 17:18:01 -04:00
Kim Spasaro cb6f884935 Not feeling creative 2016-10-03 18:04:33 -05:00
Kim Spasaro af293996c2 changing to use join instead of delimeter concatenation 2016-10-03 17:39:56 -05:00
Kim Spasaro f81936cee0 adding module list command 2016-10-03 17:39:56 -05:00
Sean Olson 20bf6fd117 add --json flag for listing overrides 2016-09-16 21:58:09 -07:00
Jack O'Connor 0e006439f9 bump version to 1.0.1
Changes since 1.0.0:
- Proper error handling. Errors during sync used to kill the entire
  process, which spammed the terminal with unfinished coroutine
  warnings. Now we catch those errors and print them properly at the
  end.
- Cleaned up plugin errors. Common errors like "the network is down" no
  longer have stacktraces cluttering them up.
2016-08-15 10:11:25 -04:00
Jack O'Connor 8e915a8069 update the AUR link to refer to the non-git package 2016-08-05 17:10:33 -04:00
Jack O'Connor 6ad24dbdf0 Merge branch 'coalesce'
Handle errors that occur inside coroutines without aborting other
running jobs or hosing the terminal.
2016-07-30 16:43:22 -04:00
Jack O'Connor e7f2859b47 don't depend on plugins emitting terminating newlines 2016-07-30 16:40:17 -04:00
Jack O'Connor c33f3165a6 delete get_only() 2016-07-30 15:51:24 -04:00
Jack O'Connor 25df5f9ecc delete a TODO 2016-07-30 15:49:29 -04:00
Jack O'Connor e06cc65e60 limit requirements-dev.txt to first order deps 2016-07-30 15:42:24 -04:00
Jack O'Connor c9b76d82a4 get rid of fixed versions for testing tools 2016-07-30 15:39:16 -04:00
Jack O'Connor 5379caf296 update no-lint tags for flake8 3.0 2016-07-30 15:34:52 -04:00
Jack O'Connor ec7c9497b9 stop flattening reprs, to preserve context 2016-07-30 15:27:58 -04:00
Jack O'Connor dbf05f831f have raises_gathered yield an exception container like assertRaises 2016-07-30 13:53:26 -04:00
Jack O'Connor 5d930eb88f two more 2016-07-30 13:43:38 -04:00
Jack O'Connor 4ebedea3a3 pass the verbose param in reup 2016-07-30 13:37:22 -04:00
Jack O'Connor 0769d514e9 even less verbose plugin error strings 2016-07-20 00:20:06 -04:00
Jack O'Connor 0d443190b5 include reprs in a way that handles verbosity 2016-07-18 19:57:56 -04:00
Jack O'Connor bc9e02f1aa starting to use raises_gathered 2016-07-18 09:36:15 -04:00