Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Commit

Permalink
Make setup.py not depend on the code being set up
Browse files Browse the repository at this point in the history
  • Loading branch information
albertyw committed Jan 27, 2020
1 parent 21149d3 commit b7812fe
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
5 changes: 1 addition & 4 deletions mailgun2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
from __future__ import absolute_import

__title__ = 'mailgun2'
__version__ = '1.1.0'
__author__ = 'Albert Wang'
__license__ = 'Apache 2.0'
from .__version__ import __version__ # noqa: F401

from .mailgun import Mailgun # noqa: F401
3 changes: 3 additions & 0 deletions mailgun2/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VERSION = (1, 1, 0)

__version__ = '.'.join(map(str, VERSION))
32 changes: 18 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
#!/usr/bin/env python
from setuptools import setup
import mailgun2
# -*- coding: utf-8 -*-

try:
readme = open("README.rst")
long_description = str(readme.read())
finally:
readme.close()
from setuptools import setup, find_packages
from codecs import open
from os import path


# Get the long description from the README file
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()

about = {}
with open(path.join(here, 'mailgun2', '__version__.py')) as f:
exec(f.read(), about)

download_url = ("https://github.com/albertyw/python-mailgun2/"
"archive/%s.tar.gz") % mailgun2.__version__

setup(
name=mailgun2.__title__,
packages=[mailgun2.__title__],
version=mailgun2.__version__,
name='mailgun2',
packages=find_packages(exclude=['tests']),
version=about['__version__'],
description='A python client for Mailgun API v2',
long_description=long_description,
author=mailgun2.__author__,
author='Albert Wang',
author_email='git@albertyw.com',
url='https://github.com/albertyw/python-mailgun2',
download_url=download_url,
keywords=['mailgun', 'email'],
install_requires=[
'requests>=2.6,<3.0',
Expand Down

0 comments on commit b7812fe

Please sign in to comment.