Compare commits
2 commits
5a8da108b9
...
58357737ef
| Author | SHA1 | Date | |
|---|---|---|---|
| 58357737ef | |||
| cc4be8b010 |
2 changed files with 7 additions and 6 deletions
|
|
@ -702,9 +702,10 @@ def parse_repo_relative_path(path: str) -> str:
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
raise argparse.ArgumentTypeError(f'File {path} does not exist.')
|
raise argparse.ArgumentTypeError(f'File {path} does not exist.')
|
||||||
real_path = os.path.realpath(path)
|
real_path = os.path.realpath(path)
|
||||||
repo = os.path.realpath(os.getenv('CONSERVANCY_REPOSITORY'))
|
try:
|
||||||
if not repo:
|
repo = os.path.realpath(os.environ['CONSERVANCY_REPOSITORY'])
|
||||||
raise argparse.ArgumentTypeError('$CONSERVANCY_REPOSITORY is not set.')
|
except KeyError:
|
||||||
|
raise argparse.ArgumentTypeError('$CONSERVANCY_REPOSITORY environment variable is not set.')
|
||||||
if not real_path.startswith(repo):
|
if not real_path.startswith(repo):
|
||||||
raise argparse.ArgumentTypeError(
|
raise argparse.ArgumentTypeError(
|
||||||
f'File {real_path} does not share a common prefix with $CONSERVANCY_REPOSITORY {repo}.'
|
f'File {real_path} does not share a common prefix with $CONSERVANCY_REPOSITORY {repo}.'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = conservancy_beancount
|
name = conservancy_beancount
|
||||||
version = 1.20.0
|
version = 1.21.0
|
||||||
author = Software Freedom Conservancy
|
author = Software Freedom Conservancy
|
||||||
author_email = info@sfconservancy.org
|
author_email = info@sfconservancy.org
|
||||||
description = Plugin, library, and reports for reading Conservancy’s books
|
description = Plugin, library, and reports for reading Conservancy’s books
|
||||||
|
|
@ -12,7 +12,7 @@ long_description = file: README.rst
|
||||||
long_description_content_type = text/x-rst; charset=UTF-8
|
long_description_content_type = text/x-rst; charset=UTF-8
|
||||||
project_urls =
|
project_urls =
|
||||||
Source = %(url)s
|
Source = %(url)s
|
||||||
url = https://k.sfconservancy.org/NPO-Accounting/conservancy_beancount
|
url = https://f.sfconservancy.org/NPO-Accounting/conservancy_beancount
|
||||||
|
|
||||||
[bdist_wheel]
|
[bdist_wheel]
|
||||||
universal = 1
|
universal = 1
|
||||||
|
|
@ -36,7 +36,7 @@ install_requires =
|
||||||
colorama
|
colorama
|
||||||
GitPython>=2.0
|
GitPython>=2.0
|
||||||
odfpy>=1.4.0,!=1.4.1
|
odfpy>=1.4.0,!=1.4.1
|
||||||
pdfminer.six>=20200101
|
pdfminer.six
|
||||||
python-dateutil>=2.7
|
python-dateutil>=2.7
|
||||||
PyYAML>=3.0
|
PyYAML>=3.0
|
||||||
regex
|
regex
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue