blob: 51d9d78ab2c4c57b79ed3f84da3fa0d6683edbb7 [file] [log] [blame]
Scott Bakerbba67b62019-01-28 17:38:21 -08001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
Zack Williams5c2ea232019-01-30 15:23:01 -070015from __future__ import absolute_import
Scott Bakerbba67b62019-01-28 17:38:21 -080016
Zack Williams5c2ea232019-01-30 15:23:01 -070017import os
18from shutil import copyfile
Scott Bakerbba67b62019-01-28 17:38:21 -080019
Zack Williams5c2ea232019-01-30 15:23:01 -070020from setuptools import setup
21
22
23def version():
24 # Copy VERSION file of parent to module directory if not found
25 if not os.path.exists("xossynchronizer/VERSION"):
26 copyfile("../../VERSION", "xossynchronizer/VERSION")
27 with open("xossynchronizer/VERSION") as f:
28 return f.read().strip()
29
30
31def parse_requirements(filename):
32 # parse a requirements.txt file, allowing for blank lines and comments
33 requirements = []
34 for line in open(filename):
35 if line and not line.startswith("#"):
36 requirements.append(line)
37 return requirements
38
39
40setup(
41 name="xossynchronizer",
42 version=version(),
Scott Bakerbba67b62019-01-28 17:38:21 -080043 description="XOS Synchronizer Framework",
44 author="Scott Baker",
45 author_email="scottb@opennetworking.org",
Zack Williams5c2ea232019-01-30 15:23:01 -070046 classifiers=["License :: OSI Approved :: Apache Software License"],
47 license="Apache v2",
Scott Bakerbba67b62019-01-28 17:38:21 -080048 packages=[
49 "xossynchronizer",
50 "xossynchronizer.steps",
51 "xossynchronizer.event_steps",
52 "xossynchronizer.pull_steps",
Zack Williams5c2ea232019-01-30 15:23:01 -070053 "xossynchronizer.model_policies"
54 ],
55 install_requires=parse_requirements("requirements.txt"),
Scott Bakerbba67b62019-01-28 17:38:21 -080056 include_package_data=True,
Scott Bakerbba67b62019-01-28 17:38:21 -080057)