Skip to content

Commit

Permalink
Merge branch 'release-0.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
sinoroc committed Sep 18, 2019
2 parents c19f9d7 + 841f30f commit 2d6f54c
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 90 deletions.
7 changes: 0 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,5 @@
variables:
'TOXENV': 'py37'

'test py38 dev':
<<: *job_test_common
allow_failure: true
image: 'python:3.8-rc'
variables:
'TOXENV': 'py38'


... EOF
10 changes: 0 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,7 @@ language: 'python'

python:
- '3.6'
- '3.6-dev'
- '3.7'
- '3.7-dev'
- '3.8-dev'

matrix:
allow_failures:
- python: '3.6-dev'
- python: '3.7-dev'
- python: '3.8-dev'
fast_finish: true

install:
- 'python3 -m pip install tox tox-travis tox-venv'
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

.. Keep the current version number on line number 5
0.0.2
=====

2019-09-18

* Add namespaces in configuration file

* Add support for default settings

* Change interpolation in configuration files

* Add support for Windows specific output file name


0.0.1
=====

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ develop:


.PHONY: package
package: sdist wheel zapp
package: sdist wheel pex


.PHONY: sdist
Expand All @@ -29,9 +29,9 @@ wheel:
python3 -m twine check dist/*.whl


.PHONY: zapp
zapp:
python3 setup.py bdist_zapp
.PHONY: pex
pex:
python3 setup.py bdist_pex


.PHONY: check
Expand Down
15 changes: 10 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Repositories

Binary distributions:

* http://pypi.org/project/toolmaker/
* https://pypi.org/project/toolmaker/

Source code:

Expand All @@ -32,20 +32,23 @@ current working directory.

.. code::
[http.pex]
[toolmaker.tool.defaults]
output_file_win = ${output_file}.pyz
[toolmaker.tool.pex:http.pex]
entry_point = http.server
output_file = http
requirements =
[pipdeptree.zapp]
[toolmaker.tool.zapp:pipdeptree.zapp]
entry_point = pipdeptree:main
output_file = pipdeptree
requirements =
pipdeptree
setuptools
[shiv.shiv]
console_script = shiv
[toolmaker.tool.shiv:shiv.shiv]
entry_point = shiv.cli:main
output_file = shiv
requirements =
shiv
Expand Down Expand Up @@ -77,6 +80,7 @@ Details
Similar projects
----------------

* `pipx`_
* `Zapper`_


Expand Down Expand Up @@ -129,6 +133,7 @@ Outside of a Python virtual environment run the following command::
.. _`GNU Make`: https://www.gnu.org/software/make/
.. _`GNU Stow`: https://www.gnu.org/software/stow/
.. _`pex`: https://pypi.org/project/pex/
.. _`pipx`: https://pipxproject.github.io/pipx/
.. _`pytest`: https://pytest.org/
.. _`shiv`: https://pypi.org/project/shiv/
.. _`tox`: https://tox.readthedocs.io/
Expand Down
11 changes: 6 additions & 5 deletions example.cfg
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
#


[http.pex]
[toolmaker.tool.defaults]
output_file_win = ${output_file}.pyz

[toolmaker.tool.pex:http.pex]
entry_point = http.server
output_file = http
requirements =


[pipdeptree.zapp]
[toolmaker.tool.zapp:pipdeptree.zapp]
entry_point = pipdeptree:main
output_file = pipdeptree
requirements =
pipdeptree
setuptools


[shiv.shiv]
[toolmaker.tool.shiv:shiv.shiv]
entry_point = shiv.cli:main
output_file = shiv
requirements =
Expand Down
8 changes: 2 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#


[bdist_zapp]
entry_point = toolmaker.cli:main


[check]
metadata = 1
strict = 1
Expand All @@ -18,13 +14,13 @@ description = toolmaker application
license = Apache-2.0
long_description = file: README.rst
long_description_content_type = text/x-rst
url = https://pypi.org/project/toolmaker
url = https://pypi.org/project/toolmaker/


[options]
install_requires =
importlib_metadata
pex
pex[cachecontrol, requests]
shiv
zapp
package_dir =
Expand Down
12 changes: 8 additions & 4 deletions src/toolmaker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,20 @@ def main():
args_parser = _create_args_parser(default_config_path)
args = args_parser.parse_args()

config = None
raw_config = None
if args.config:
logger.info("Reading configuration from file '%s'", args.config)
config = configparser.ConfigParser()
raw_config = configparser.ConfigParser(
default_section='toolmaker.tool.defaults',
interpolation=configparser.ExtendedInterpolation(),
)
try:
config.read_file(args.config)
raw_config.read_file(args.config)
except configparser.Error as config_error:
args_parser.error(config_error)
tools_names = config.sections()
config = core.parse_config(raw_config)

tools_names = list(config['tools'].keys())
if not args.all:
args_parser = _create_args_parser(default_config_path, tools_names)
args = args_parser.parse_args()
Expand Down
Loading

0 comments on commit 2d6f54c

Please sign in to comment.