Skip to content

Commit

Permalink
more twine moves and cleanup of setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Oct 2, 2022
1 parent 145d51e commit 6dc4d7d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@

PYTHON = python
PANDOC = pandoc
# PANDOC = pandoc
PYLINT = pylint
TWINE = twine

#EMAIL = "martin@cloudflare.com"
EMAIL = "mahtin@mahtin.com"
NAME = "cloudflare"

all: README.rst CHANGELOG.md build
#all: README.rst CHANGELOG.md build
all: CHANGELOG.md build

README.rst: README.md
$(PANDOC) --wrap=none --from=markdown --to=rst < README.md > README.rst
# README.rst: README.md
# $(PANDOC) --wrap=none --from=markdown --to=rst < README.md > README.rst

CHANGELOG.md: FORCE
@ tmp=/tmp/_$$$$.md ; \
Expand Down Expand Up @@ -42,18 +43,21 @@ sdist: all
make clean
make test
$(PYTHON) setup.py -q sdist
$(TWINE) check dist/*
@rm -rf ${NAME}.egg-info

bdist: all
make clean
make test
$(PYTHON) setup.py -q bdist
$(TWINE) check dist/*
@rm -rf ${NAME}.egg-info

bdist_wheel: all
make clean
make test
$(PYTHON) setup.py -q bdist_wheel
$(TWINE) check dist/*
@rm -rf ${NAME}.egg-info

upload: clean all tag upload-github upload-pypi
Expand All @@ -64,7 +68,7 @@ upload-github:

upload-pypi:
## $(PYTHON) setup.py -q sdist bdist_wheel upload # --sign --identity="$(EMAIL)"
twine upload -r pypi dist/*
$(TWINE) upload -r pypi dist/*

showtag: sdist
@ v=`ls -r dist | head -1 | sed -e 's/cloudflare-\([0-9.]*\)\.tar.*/\1/'` ; echo "\tDIST VERSION =" $$v ; (git tag | fgrep -q "$$v") && echo "\tGIT TAG EXISTS"
Expand Down
20 changes: 4 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def main():
"""Cloudflare API code - setup.py file"""

with open('README.rst') as read_me:
with open('README.md') as read_me:
long_description = read_me.read()

with open('CloudFlare/__init__.py', 'r') as f:
Expand All @@ -20,17 +20,13 @@ def main():
version=version,
description='Python wrapper for the Cloudflare v4 API',
long_description=long_description,
long_description_content_type='text/markdown',
author='Martin J. Levy',
author_email='martin@cloudflare.com',
# maintainer='Martin J. Levy',
# maintainer_email='martin@cloudflare.com',
author_email='mahtin@mahtin.com',
url='https://github.com/cloudflare/python-cloudflare',
license='MIT',
options={"bdist_wheel": {"universal": True}},
packages=['cli4', 'examples']+find_packages(),
#package_dir={'CloudFlare': 'lib'}
#package_dir={'CloudFlare/examples': 'examples'},
#package_data={'cloudflare-examples': ["examples/*"]},
include_package_data=True,
data_files = [('share/man/man1', ['cli4/cli4.1'])],
install_requires=['requests', 'pyyaml', 'jsonlines', 'beautifulsoup4'],
Expand All @@ -45,17 +41,9 @@ def main():
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
'License :: OSI Approved :: MIT License',
'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.8'
'Programming Language :: Python :: 3'
]
)


if __name__ == '__main__':
main()

0 comments on commit 6dc4d7d

Please sign in to comment.