blob: 32bdff46044a5f72b880e64e88915f9ec20ef242 [file] [log] [blame]
Matteo Scandolod2044a42017-08-07 16:08:28 -07001# 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 Williams9a42f872019-02-15 17:56:04 -070015from __future__ import absolute_import
Scott Bakerbcbd4cc2018-03-07 13:50:21 -080016
Zack Williams9a42f872019-02-15 17:56:04 -070017import os
18from shutil import copyfile
19
20from 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("xosgenx/VERSION"):
26 copyfile("../../VERSION", "xosgenx/VERSION")
27 with open("xosgenx/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):
Zack Williams67142162019-03-06 14:01:32 -070035 if line and not line.startswith("#"):
Zack Williams9a42f872019-02-15 17:56:04 -070036 requirements.append(line)
37 return requirements
38
Scott Bakerbcbd4cc2018-03-07 13:50:21 -080039
Zack Williams045b63d2019-01-22 16:30:57 -070040setup(
Zack Williams9a42f872019-02-15 17:56:04 -070041 name="xosgenx",
42 version=version(),
Zack Williams045b63d2019-01-22 16:30:57 -070043 description="XOS Generative Toolchain",
44 author="Sapan Bhatia, Matteo Scandolo",
Zack Williams67142162019-03-06 14:01:32 -070045 author_email="cord-dev@opencord.org",
46 url="https://gerrit.opencord.org/gitweb?p=xos.git",
Zack Williams9a42f872019-02-15 17:56:04 -070047 classifiers=["License :: OSI Approved :: Apache Software License"],
48 license="Apache v2",
Zack Williams045b63d2019-01-22 16:30:57 -070049 packages=["xosgenx"],
50 scripts=["bin/xosgenx"],
Zack Williams9a42f872019-02-15 17:56:04 -070051 install_requires=parse_requirements("requirements.txt"),
Zack Williams045b63d2019-01-22 16:30:57 -070052 include_package_data=True,
Zack Williams045b63d2019-01-22 16:30:57 -070053)