Skip to content

Commit

Permalink
Use twine
Browse files Browse the repository at this point in the history
  • Loading branch information
ksindi committed Sep 12, 2020
1 parent 4f9c22f commit 68fd69a
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 73 deletions.
58 changes: 48 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
bin/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
Expand All @@ -22,6 +24,12 @@ var/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
Expand All @@ -30,25 +38,55 @@ pip-delete-this-directory.txt
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Rope
.ropeproject
*.pot

# Django stuff:
*.log
*.pot
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# IPython Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject

# PyCharm
.idea/
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include tox.ini
include LICENSE README.md tox.ini
54 changes: 41 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,59 @@
.PHONY: clean-pyc clean-build docs clean build install install-all version
.PHONY: clean build install version release dist

help:
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "clean-test - remove Python file artifacts"
@echo "clean-eggs - remove cached eggs"
@echo "build - build package"
@echo "version - get version number"
@echo "install - install packages"
@echo "test - run tests quickly with the default Python"
@echo "test-all - run tests on every Python version with tox"
@echo "release - package and upload a release"
@echo "dist - package"

clean: clean-build clean-pyc
clean: clean-build clean-test clean-eggs
rm -rf htmlcov/

clean-build:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info

clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
.PHONY: clean-test
clean-test:
find . | grep -E "(__pycache__|\.pyc|\.pyo$$)" | xargs rm -rf
rm -rf .pytest_cache/

.PHONY: clean-eggs
clean-eggs:
rm -rf .eggs/

.PHONY: build
build: clean-build clean-eggs
python3 setup.py build_ext --inplace

install: clean-build
python3 setup.py install

version:
python setup.py --version
python3 setup.py --version

.PHONY: test
test:
python3 setup.py test

.PHONY: test-all
test-all:
tox

.PHONY: release
release: clean build
python setup.py sdist upload
python setup.py bdist_wheel upload
python3 setup.py sdist bdist_wheel
twine check dist/*
twine upload --verbose dist/*

.PHONY: dist
dist: clean build
python setup.py sdist
python setup.py bdist_wheel
ls -l dist
python3 setup.py sdist bdist_wheel
twine check dist/*
45 changes: 0 additions & 45 deletions README.rst

This file was deleted.

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description-file = README.md
max-line-length = 120
exclude = .tox

[pytest]
[tool:pytest]
pep8maxlinelength = 120
addopts = --tb=short

Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def run_tests(self):
setup(
name='flask-sqlacodegen',
description='Automatic model code generator for SQLAlchemy with Flask support',
long_description=open('README.rst').read(),
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
version=sqlacodegen.version,
author='Kamil Sindi',
classifiers=[
Expand All @@ -36,15 +37,14 @@ def run_tests(self):
'Topic :: Database',
'Topic :: Software Development :: Code Generators',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7'
'Programming Language :: Python :: 3.7',
],
keywords=['sqlalchemy', 'sqlacodegen', 'flask'],
license='MIT',
Expand Down

0 comments on commit 68fd69a

Please sign in to comment.