2017-09-02 19:30:40 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
import re
|
|
|
|
import ast
|
|
|
|
import sys
|
|
|
|
|
|
|
|
from setuptools import setup, find_packages
|
|
|
|
from setuptools.command.test import test as TestCommand
|
|
|
|
|
|
|
|
from codecs import open
|
|
|
|
from os import path
|
|
|
|
|
|
|
|
|
|
|
|
class PyTest(TestCommand):
|
|
|
|
user_options = [('pytest-args=', 'a', 'Arguments to pass to pytest')]
|
|
|
|
|
|
|
|
def initialize_options(self):
|
|
|
|
TestCommand.initialize_options(self)
|
|
|
|
self.pytest_args = ''
|
|
|
|
|
|
|
|
def run_tests(self):
|
|
|
|
import shlex
|
|
|
|
import pytest
|
|
|
|
errno = pytest.main(shlex.split(self.pytest_args))
|
|
|
|
sys.exit(errno)
|
|
|
|
|
|
|
|
|
|
|
|
here = path.abspath(path.dirname(__file__))
|
2023-04-17 06:06:47 +00:00
|
|
|
_version_re = re.compile(r'__version__\s+=\s+(.*)')
|
2017-09-02 19:30:40 +00:00
|
|
|
|
2023-04-17 06:06:47 +00:00
|
|
|
with open(path.join(here, 'pmb/__init__.py'), 'rb') as f:
|
2021-05-19 18:13:08 +00:00
|
|
|
version = str(ast.literal_eval(_version_re.search(
|
|
|
|
f.read().decode('utf-8')).group(1)))
|
2017-09-02 19:30:40 +00:00
|
|
|
|
|
|
|
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
|
|
|
|
long_description = f.read()
|
|
|
|
|
|
|
|
|
|
|
|
setup(
|
|
|
|
name='pmbootstrap',
|
|
|
|
version=version,
|
2021-05-19 18:13:08 +00:00
|
|
|
description='A sophisticated chroot / build / flash tool to '
|
|
|
|
'develop and install postmarketOS',
|
2017-09-02 19:30:40 +00:00
|
|
|
long_description=long_description,
|
2018-10-12 07:07:30 +00:00
|
|
|
long_description_content_type='text/markdown',
|
2017-09-02 19:30:40 +00:00
|
|
|
author='postmarketOS Developers',
|
|
|
|
author_email='info@postmarketos.org',
|
|
|
|
url='https://www.postmarketos.org',
|
|
|
|
license='GPLv3',
|
2023-03-26 16:49:33 +00:00
|
|
|
python_requires='>=3.7',
|
2017-09-02 19:30:40 +00:00
|
|
|
classifiers=[
|
2020-07-11 14:19:52 +00:00
|
|
|
'Development Status :: 5 - Production/Stable',
|
2017-09-02 19:30:40 +00:00
|
|
|
'Intended Audience :: Developers',
|
|
|
|
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
|
|
|
|
'Programming Language :: Python :: 3',
|
2020-03-07 11:04:27 +00:00
|
|
|
'Programming Language :: Python :: 3.7',
|
|
|
|
'Programming Language :: Python :: 3.8',
|
2023-03-26 16:49:33 +00:00
|
|
|
'Programming Language :: Python :: 3.9',
|
|
|
|
'Programming Language :: Python :: 3.10',
|
|
|
|
'Programming Language :: Python :: 3.11',
|
2017-09-02 19:30:40 +00:00
|
|
|
],
|
|
|
|
keywords='postmarketos pmbootstrap',
|
|
|
|
packages=find_packages(exclude=['aports', 'keys', 'test']),
|
|
|
|
tests_require=['pytest'],
|
|
|
|
cmdclass={'test': PyTest},
|
2018-08-27 21:35:05 +00:00
|
|
|
extras_require={
|
|
|
|
'completion': ['argcomplete'],
|
|
|
|
},
|
2017-09-02 19:30:40 +00:00
|
|
|
entry_points={
|
|
|
|
'console_scripts': [
|
|
|
|
'pmbootstrap=pmb:main',
|
|
|
|
],
|
|
|
|
},
|
2018-10-08 19:41:42 +00:00
|
|
|
include_package_data=True,
|
2017-09-02 19:30:40 +00:00
|
|
|
)
|