Skip to content

Commit

Permalink
Change to the modern Python library layout
Browse files Browse the repository at this point in the history
  • Loading branch information
romanvm committed Jul 6, 2023
1 parent 018b723 commit 9cdc061
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 49 deletions.
4 changes: 0 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import sys
import os

sys.path.insert(0, os.path.abspath('..'))
import kodistubs_meta

extensions = [
Expand Down
19 changes: 19 additions & 0 deletions docs/kodistubs_meta.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# (c) 2018, Roman Miroshnychenko <roman1972@gmail.com>
# License: GPL v.3
# This file is needed for docs

import datetime
from configparser import ConfigParser
from pathlib import Path

project_dir = Path(__file__).resolve().parent
setup_cfg = project_dir / 'setup.cfg'

config = ConfigParser()
config.read([setup_cfg])
metadata = config['metadata']

VERSION = metadata['version']
AUTHOR = metadata['author']
EMAIL = metadata['author_email']
YEAR = datetime.datetime.now().year
10 changes: 0 additions & 10 deletions kodistubs_meta.py

This file was deleted.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
31 changes: 31 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[metadata]
name = Kodistubs
version = 20.0.1
author = Roman Miroshnychenko
author_email = roman1972@gmail.com
url = https://github.com/romanvm/Kodistubs
description = Stub modules that re-create Kodi Python API
long_description = file: README.rst
long_description_content_type = text/x-rst
keywords = kodi documentation inspection
license = GPL-3.0-only
classifiers =
Environment :: Plugins
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Operating System :: OS Independent
Programming Language :: Python :: 3
Topic :: Software Development :: Libraries
Topic :: Software Development :: Libraries :: Python Modules
platform = any

[options]
py_modules =
xbmc
xbmcaddon
xbmcgui
xbmcplugin
xbmcvfs
xbmcdrm
zip_safe = False
include_package_data = True
python_requires = >=3.6
37 changes: 2 additions & 35 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,36 +1,3 @@
# coding: utf-8
from setuptools import setup

from io import open
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from kodistubs_meta import AUTHOR, EMAIL, VERSION

with open('README.rst', encoding='utf-8') as fo:
long_descr = fo.read()

setup(
name='Kodistubs',
version=VERSION,
py_modules=[
'xbmc', 'xbmcaddon', 'xbmcgui', 'xbmcplugin', 'xbmcvfs', 'xbmcdrm'
],
zip_safe=False,
python_requires='>=3.6',
description='Stub modules that re-create Kodi Python API',
long_description=long_descr,
author=AUTHOR, # The new Kodistubs have been generated from scratch
author_email=EMAIL,
url='https://github.com/romanvm/Kodistubs',
license='GPLv3',
keywords="kodi documentation inspection",
classifiers=[
'Environment :: Plugins',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)
setup()

0 comments on commit 9cdc061

Please sign in to comment.