Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Commit

Permalink
Properly install from pypi and load long description
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Cordell committed Sep 9, 2014
1 parent 009b81f commit 3e0f546
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
recursive-include docs *
recursive-exclude docs/_templates *
recursive-exclude docs/_build *
include *.py
include README.md
include LICENSE.md
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ License
The project is licensed under the MIT license.


.. comment: split here
Contents:

.. toctree::
Expand Down
7 changes: 6 additions & 1 deletion macaroons/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
VERSION = (0, 1, 1)
from macaroons.macaroon import Macaroon
from macaroons.verifier import Verifier

VERSION = (0, 1, 8)
__version__ = '.'.join(str(x) for x in VERSION)


__all__ = [
'VERSION',
'__version__',
'Macaroon',
'Verifier',
]
17 changes: 10 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@

from setuptools import find_packages, setup

from macaroons import __version__

version = __import__('macaroons').__version__


def read_file(*paths):
here = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(here, *paths)) as f:
return f.read()

# Get long_description from index.rst:
here = os.path.dirname(os.path.abspath(__file__))
f = open(os.path.join(here, 'docs', 'index.rst'))
long_description = f.read().strip()
long_description = long_description.split('split here', 1)[1]
f.close()
long_description = read_file('docs', 'index.rst')
long_description = long_description.strip().split('split here', 2)[1][:-12]

setup(
name='pymacaroons',
version=__version__,
version=version,
description='Macaroon library for Python',
author='Evan Cordell',
author_email='evan.cordell@localmed.com',
Expand Down

0 comments on commit 3e0f546

Please sign in to comment.