From 8a9364c374e1401a14bcddbf016036c786d549bf Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Thu, 26 May 2022 09:41:34 +0200 Subject: [PATCH] Add long description to setup.py Related: https://pagure.io/koji/issue/3373 --- koji.spec | 1 + setup.py | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/koji.spec b/koji.spec index 051aa206..fcf6ef25 100644 --- a/koji.spec +++ b/koji.spec @@ -146,6 +146,7 @@ BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python3-pip BuildRequires: python3-wheel BuildRequires: python3-setuptools +BuildRequires: python3-six %if 0%{?fedora} || 0%{?rhel} >= 8 Requires: python%{python3_pkgversion}-rpm %else diff --git a/setup.py b/setup.py index 84b536a7..c965c8f1 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ #!/usr/bin/env python from __future__ import absolute_import +import os.path from setuptools import setup @@ -23,16 +24,25 @@ def get_install_requires(): def get_version(): - exec(open('koji/_version.py', 'rt').read()) + cwd = os.path.dirname(__file__) + exec(open(os.path.join(cwd, 'koji/_version.py'), 'rt').read()) return(locals()['__version__']) +def get_long_description(): + cwd = os.path.dirname(__file__) + return open(os.path.join(cwd, "README.md"), "rt").read() + + setup( name="koji", version=get_version(), description=("Koji is a system for building and tracking RPMS. The base" " package contains shared libraries and the command-line" " interface."), + long_description=get_long_description(), + long_description_content_type='text/markdown', + include_package_data=True, license="LGPLv2 and GPLv2+", url="http://pagure.io/koji/", author='Koji developers', @@ -58,6 +68,9 @@ setup( 'koji_cli': 'cli/koji_cli', 'koji_cli_plugins': 'plugins/cli', }, + package_data={ + '': ['README.md'], + }, # doesn't make sense, as we have only example config # data_files=[ # ('/etc', ['cli/koji.conf']),