Skip to content

Commit

Permalink
Merge branch 'release-0.0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
sinoroc committed Apr 20, 2020
2 parents df4cb9e + 97d7fc9 commit 70ae96f
Show file tree
Hide file tree
Showing 12 changed files with 193 additions and 86 deletions.
19 changes: 10 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
---


'.test_common': &job_test_common
'.review':
script:
- 'export TOXENV="${CI_JOB_NAME##review}"'
- 'python3 -m pip install tox'
- 'python3 -m tox'
- 'python3 -m tox -e package'

'test py36':
<<: *job_test_common
'review py36':
extends: '.review'
image: 'python:3.6'
variables:
'TOXENV': 'py36'

'test py37':
<<: *job_test_common
'review py37':
extends: '.review'
image: 'python:3.7'
variables:
'TOXENV': 'py37'

'review py38':
extends: '.review'
image: 'python:3.8'


... EOF
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ language: 'python'
python:
- '3.6'
- '3.7'
- '3.8'

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

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

2020-04-20

* Add support for 'requirements.txt' files
* Fix call to main entry point of 'shiv', somewhat revert the change introduced
in version '0.0.5'.
* Show summary in CLI's help output
* Add test against Python3.8 in Travis CI and GitLab


0.0.5
=====

Expand Down
14 changes: 11 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,21 @@ By default this tool looks for a configuration file at the following location:
[toolmaker.tool.pex:http]
entry_point = http.server
requirements =
[toolmaker.tool.shiv:shiv]
entry_point = shiv.cli:main
requirements =
shiv
[toolmaker.tool.zapp:something]
entry_point = something.cli:main
requirements =
--no-index
SomeRandomProject --find-links /path/to/location
requirements_txts =
requirements.txt
more.txt
Action
------
Expand All @@ -59,8 +67,8 @@ The action can be specified on the command line. Either one of:

* ``--build``, ``-b`` to build (already existing tools are skipped);
* ``--rebuild``, ``-r`` to rebuild (already existing tools are rebuilt);
* ``--delete``, ``-d`` to delete (tool target file is deleted if it exists, then
its parent directory is deleted if it is empty).
* ``--delete``, ``-d`` to delete (tool target file is deleted if it exists,
then its parent directory is deleted if it is empty).

The default action when no flag is specified is to build the tools.

Expand Down
22 changes: 0 additions & 22 deletions example.cfg

This file was deleted.

8 changes: 8 additions & 0 deletions examples/bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#


*
!.gitignore


# EOF
1 change: 1 addition & 0 deletions examples/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
toolmaker
41 changes: 41 additions & 0 deletions examples/toolmaker.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#


[toolmaker.tool.defaults]
tools_directory = examples/bin

[toolmaker.tool.pex:toolmaker_pex_req]
entry_point = toolmaker.cli:main
requirements =
toolmaker

[toolmaker.tool.pex:toolmaker_pex_txt]
entry_point = toolmaker.cli:main
requirements_txts =
requirements.txt

[toolmaker.tool.pex:http_pex]
entry_point = http.server

[toolmaker.tool.shiv:toolmaker_shiv_req]
entry_point = toolmaker.cli:main
requirements =
toolmaker

[toolmaker.tool.shiv:toolmaker_shiv_txt]
entry_point = toolmaker.cli:main
requirements_txts =
requirements.txt

[toolmaker.tool.zapp:toolmaker_zapp_req]
entry_point = toolmaker.cli:main
requirements =
toolmaker

[toolmaker.tool.zapp:toolmaker_zapp_txt]
entry_point = toolmaker.cli:main
requirements_txts =
requirements.txt


# EOF
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ strict = 1
name = toolmaker
author = sinoroc
author_email = [email protected]
description = toolmaker application
description = Make single-file builds of Python tools using zapp, shiv, or pex
license = Apache-2.0
license_file = LICENSE.txt
long_description = file: README.rst
Expand Down
5 changes: 4 additions & 1 deletion src/toolmaker/_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

PROJECT_NAME = 'toolmaker'

VERSION = importlib_metadata.version(PROJECT_NAME)
_DISTRIBUTION_METADATA = importlib_metadata.metadata(PROJECT_NAME)

SUMMARY = _DISTRIBUTION_METADATA['Summary']
VERSION = _DISTRIBUTION_METADATA['Version']


# EOF
1 change: 1 addition & 0 deletions src/toolmaker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
def _create_args_parser(default_config_path, tools_names=None):
args_parser = argparse.ArgumentParser(
allow_abbrev=False,
description=_meta.SUMMARY,
)
args_parser.add_argument(
'--version',
Expand Down
Loading

0 comments on commit 70ae96f

Please sign in to comment.