Skip to content

Commit

Permalink
🔖 Version 2.0.0
Browse files Browse the repository at this point in the history
- Removes Python 2 support
- Packaging updates
  - Updated Makefile
  - Determine version automatically
  - Adds .editorconfig
  • Loading branch information
jontsai committed Aug 20, 2023
1 parent d90fe13 commit 1552577
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 16 deletions.
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# http://editorconfig.org
# Properties: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf

# Docstrings and comments use max_line_length = 79
[*.py]
max_line_length = 119
indent_size = 4

[**.txt]
max_line_length = 79

[Makefile]
indent_style = tab
29 changes: 19 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
VERSION := $(shell grep __version__ htk/__version__.py | awk '{ print $$3 }' | tr -d "'")

## help - Display help about make targets for this Makefile
help:
@cat Makefile | grep '^## ' --color=never | cut -c4- | sed -e "`printf 's/ - /\t- /;'`" | column -s "`printf '\t'`" -t

## clean - cleans build artifacts
## isort - isort Python files
isort:
isort -rc *

## clean - Cleans build artifacts
clean:
rm -rf dist/*
rm -rf build/*

## package - builds a package for dist
## version - Shows current version of package
version:
echo $(VERSION)

## package - Builds a package for dist
package:
python setup.py sdist bdist_wheel

## repackage - alias of 'make clean package'
## repackage - Alias of 'make clean package'
repackage: clean package

## install - install a built dist
## install - Install a built dist
install:
sh -c "pip install -U dist/htk-`cat VERSION`.tar.gz"
sh -c "pip install -U dist/htk-$(VERSION).tar.gz"

## upload - uploads a package to PyPI
## upload - Uploads a package to PyPI
upload:
sh -c "twine upload dist/htk-`cat VERSION`-py2.py3-none-any.whl"
sh -c "twine upload dist/htk-$(VERSION)-py2.py3-none-any.whl"

## isort - isort Python files
isort:
isort -rc *
## publish - Clean, package, and publish to PyPI
publish: repackage upload
2 changes: 1 addition & 1 deletion htk/__version__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__title__ = 'htk'
__description__ = 'A set of convenience utils for Python'
__url__ = 'https://github.com/hacktoolkit/python-htk'
__version__ = '1.3.1'
__version__ = '2.0.0'
__author__ = 'Hacktoolkit'
__author_email__ = 'hello@hacktoolkit.com'
__license__ = 'MIT'
Expand Down
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
See:
https://packaging.python.org/en/latest/distributing.html
https://packaging.python.org/en/latest/tutorials/packaging-projects/
https://github.com/pypa/sampleproject
"""

Expand Down Expand Up @@ -68,12 +69,12 @@

# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
# 'Programming Language :: Python :: 2',
# 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
#'Programming Language :: Python :: 3.3',
#'Programming Language :: Python :: 3.4',
#'Programming Language :: Python :: 3.5',
# 'Programming Language :: Python :: 3.3',
# 'Programming Language :: Python :: 3.4',
# 'Programming Language :: Python :: 3.5',
],

# What does your project relate to?
Expand Down

0 comments on commit 1552577

Please sign in to comment.