forked from artefactual/archivematica-storage-service
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
53 lines (43 loc) · 1.85 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2013 Artefactual Systems Inc. http://www.artefactual.com
#
# This file is part of archivematica-storage-service.
# archivematica-storage-service is free software: you can redistribute it
# and/or modify it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# archivematica-storage-service is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with archivematica-storage-service. If not,
# see <http://www.gnu.org/licenses/>.
from __future__ import absolute_import
import codecs
import os
import re
from setuptools import setup
def read(*parts):
path = os.path.join(os.path.dirname(__file__), *parts)
with codecs.open(path, encoding="utf-8") as fobj:
return fobj.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.")
setup(
name="archivematica-storage-service",
packages=["storage_service"],
version=find_version("storage_service", "storage_service", "__init__.py"),
author=u"Artefactual Systems Inc",
author_email="[email protected]",
url="https://github.com/artefacutal/archivematica-storage-service",
description="Django based webapp for managing storage in an Archivematica installation",
license="Affero GNU General Public License v3 or later",
)