diff options
author | Val Neekman <val@neekware.com> | 2017-04-11 10:05:45 -0400 |
---|---|---|
committer | Val Neekman <val@neekware.com> | 2017-04-11 10:05:45 -0400 |
commit | 5826d0d022b84be6419979c30a61507ba1384359 (patch) | |
tree | 7aeab5ff95002c2748b7a09fff687df3055ef94a | |
parent | ea5e26af19b3e99ef47c3b802fddb87b03fa3fae (diff) | |
download | python-slugify-5826d0d022b84be6419979c30a61507ba1384359.tar.gz |
build/publish enhancements1.2.4
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | MANIFEST.in | 3 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rwxr-xr-x | setup.py | 38 | ||||
-rw-r--r-- | slugify/__init__.py | 2 |
6 files changed, 18 insertions, 33 deletions
@@ -58,3 +58,5 @@ docs/_build/ # PyBuilder target/ + +*.*DS_Store diff --git a/CHANGELOG.md b/CHANGELOG.md index 57bf6fb..aa33321 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ ## 1.2.3 + - Remove build artifacts during packaging + - Simplify the setup.py file (@reece) + +## 1.2.3 - Republish - possible corrupt 1.2.2 build ## 1.2.2 diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index a308077..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,3 +0,0 @@ -include LICENSE -include README.rst -include requirements.txt diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..3c6e79c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from setuptools import setup +from setuptools import setup, find_packages import re import os import sys @@ -19,8 +19,9 @@ install_requires = ['Unidecode>=0.04.16'] classifiers = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', + 'Topic :: Software Development :: Build Tools', 'License :: OSI Approved :: MIT License', - 'Operating System :: POSIX', + 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', @@ -41,38 +42,17 @@ def get_version(package): return re.search("^__version__ = ['\"]([^'\"]+)['\"]", init_py, re.MULTILINE).group(1) -def get_packages(package): - """ - Return root package and all sub-packages. - """ - return [dirpath - for dirpath, dirnames, filenames in os.walk(package) - if os.path.exists(os.path.join(dirpath, '__init__.py'))] - - -def get_package_data(package): - """ - Return all files under the root package, that are not in a - package themselves. - """ - walk = [(dirpath.replace(package + os.sep, '', 1), filenames) - for dirpath, dirnames, filenames in os.walk(package) - if not os.path.exists(os.path.join(dirpath, '__init__.py'))] - - filepaths = [] - for base, filenames in walk: - filepaths.extend([os.path.join(base, filename) - for filename in filenames]) - return {package: filepaths} - +if sys.argv[-1] == 'build': + os.system("python setup.py sdist bdist_wheel") if sys.argv[-1] == 'publish': - os.system("python setup.py sdist upload") + os.system("twine upload dist/*") args = {'version': get_version(package)} print("You probably want to also tag the version now:") print(" git tag -a %(version)s -m 'version %(version)s' && git push --tags" % args) sys.exit() +EXCLUDE_FROM_PACKAGES = [] setup( name=name, @@ -80,10 +60,10 @@ setup( url=url, license=license, description=description, + long_description=description, author=author, author_email=author_email, - packages=get_packages(package), - package_data=get_package_data(package), + packages=find_packages(exclude=EXCLUDE_FROM_PACKAGES), install_requires=install_requires, classifiers=classifiers, entry_points={'console_scripts': ['slugify=slugify.slugify:main']}, diff --git a/slugify/__init__.py b/slugify/__init__.py index ba4a2af..79e1d28 100644 --- a/slugify/__init__.py +++ b/slugify/__init__.py @@ -3,4 +3,4 @@ from .slugify import * __author__ = 'Val Neekman @ Neekware Inc. [@vneekman]' __description__ = 'A Python slugify application that also handles Unicode' -__version__ = '1.2.3' +__version__ = '1.2.4' |