Commit af9a3b8b authored by Yuanle Song's avatar Yuanle Song
Browse files

v1.6.0 support "make dist", "make upload"

these allow author to build dist and upload dist to pypi.org
parent ea36bb3b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
(defproject python/lein-template "1.5.8"
(defproject python/lein-template "1.6.0"
  :description "lein template for a python project"
  :url "https://gitlab.emacsos.com/sylecn/python-project-template"
  :license {:name "Apache License 2.0"
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
                        "requirements.txt"
                        "requirements-dev.txt"
                        "setup.py"
                        "MANIFEST.in"
                        "Dockerfile.template"
                        "app.yaml"
                        "README.rst"
+3 −0
Original line number Diff line number Diff line
global-exclude test_*.py
include utils/versionutils.py
include requirements.txt
+12 −0
Original line number Diff line number Diff line
@@ -20,6 +20,18 @@ DOCKER_IMAGE_PREFIX := de02-reg.emacsos.com/sylecn
BUILD_DOCKER_IMAGE := de02-reg.emacsos.com/sylecn/python-build-image:1.0.0

default: check-coding-style
dist: bootstrap
	rm -rf dist/*
	$(PYTHON) setup.py -q sdist
	$(PYTHON) setup.py -q bdist_wheel --universal
upload: dist
	test -e $(VENV)/bin/twine || $(PIP) install -q twine
	$(VENV)/bin/twine check dist/*.whl
	$(VENV)/bin/twine check dist/*.tar.gz
	@if ! [ -n "$(TWINE_USERNAME)" -o -e ~/.pypirc ]; then \
		echo "You may want to save pypi user/password in env var or ~/.pypirc file."; \
	fi
	$(VENV)/bin/twine upload dist/*
build:

version:
+1 −3
Original line number Diff line number Diff line
@@ -25,9 +25,6 @@ setup(
    version=get_version_from_init_file(),
    packages=find_packages(exclude=("utils",)),
    install_requires=requirements_file_to_list(),
    dependency_links=[
        "https://emacsos.com/python/packages/"
    ],
    entry_points={
        # 'console_scripts': [
        #     'main = {{python-pkg-name}}.main:main',
@@ -42,6 +39,7 @@ setup(
    maintainer_email="sylecn@gmail.com",
    description="FIXME add description",
    long_description=open('README.rst').read(),
    long_description_content_type='text/x-rst',
    license="GPLv3+",
    url="https://pypi.org/project/{{name}}/",
    classifiers=[