Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jrwdunham committed Apr 9, 2018
1 parent 372f575 commit 7c11b1c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
include metsrw/resources/*
include VERSION
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

2 changes: 1 addition & 1 deletion metsrw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
has_methods,
is_class
)
from .version import __version__
from . import plugins

LOGGER = logging.getLogger(__name__)
LOGGER.addHandler(logging.NullHandler())
__version__ = '0.2.0'

__all__ = ['MetsError', 'ParseError', 'FSEntry', 'AMDSec', 'SubSection',
'MDRef', 'MDWrap', 'METSDocument', 'NAMESPACES', 'SCHEMA_LOCATIONS',
Expand Down
28 changes: 20 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,37 @@
https://github.com/pypa/sampleproject
"""

# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
import codecs
from os import path
import re

from setuptools import setup, find_packages

here = path.abspath(path.dirname(__file__))

with open(path.join(here, 'VERSION')) as version_file:
version = version_file.read().strip()

def read(*parts):
with codecs.open(path.join(here, *parts), 'r') as fp:
return fp.read()


def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")


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


setup(
name='metsrw',
version=version,
version=find_version('metsrw', '__init__.py'),

description='Library for dealing with METS files.',
long_description=long_description,
Expand Down

0 comments on commit 7c11b1c

Please sign in to comment.