setup.py 2.66 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# Beiran P2P Package Distribution Layer
# Copyright (C) 2019  Rainlab Inc & Creationline, Inc & Beiran Contributors
#
# Rainlab Inc. https://rainlab.co.jp
# Creationline, Inc. https://creationline.com">
# Beiran Contributors https://docs.beiran.io/contributors.html
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

21
"""setup.py for packaging beiran"""
22 23 24 25 26 27 28 29 30 31 32 33 34
from setuptools import setup, find_packages
from beiran.version import get_version


REQUIREMENTS_PATH = 'beiran/requirements.txt'


def read_requirements(path):
    """Read requirements.txt and return a list of requirements."""
    with open(path, 'r') as file:
        reqs = file.read().splitlines()
    return reqs

35 36 37 38 39 40 41 42 43 44 45 46
def read_long_description():
    """Read a file written about long description of the package."""
    with open("README.md", "r") as file:
        long_description = file.read()
    return long_description


def find_beiran_packages():
    """Find beiran package."""
    return find_packages(
        exclude=["plugins", "doc", "helpers",]
    )
47 48 49

setup(
    name="beiran",
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
    version=get_version(component='library'),
    author="RainLab",
    author_email="info@rainlab.co.jp",
    description="A p2p package manager",
    keywords=['p2p package manager', 'system tools'],
    long_description=read_long_description(),
    long_description_content_type="text/markdown",
    url="https://beiran.io",

    classifiers=[
        "Development Status :: 3 - Alpha",
        "Intended Audience :: System Administrators",
        "Topic :: System :: Software Distribution"
        "Topic :: System :: Systems Administration",
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",  # ???
        "Operating System :: OS Independent",
    ],

69 70
    install_requires=read_requirements(REQUIREMENTS_PATH),
    python_requires='~=3.6',
71 72 73

    packages=find_beiran_packages(),
    entry_points={
74 75 76 77 78
        "console_scripts": [
            "beiran = beiran.__main__:main",
            "beirand = beiran.daemon.__main__:main"
        ]
    },
79
    data_files=[
80
        ('', ['beiran/config.toml'])
81 82
    ],

83
)