-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[setup] add setup.py; fix 'path' class; change settings file name
- Loading branch information
Showing
26 changed files
with
100 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"python.languageServer": "Pylance", | ||
"python.linting.pylintEnabled": true, | ||
"python.pythonPath": "/usr/bin/python3.8" | ||
"python.pythonPath": "venv/bin/python" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
import platform | ||
import setuptools | ||
from pathlib import Path | ||
|
||
|
||
sources_dir = 'src' | ||
|
||
if 'linux' not in platform.system().lower(): | ||
raise Exception('The package requires GNU Linux. Aborting installation...') | ||
|
||
|
||
def version(): | ||
return Path(sources_dir, "actions_gui/VERSION").read_text() | ||
|
||
|
||
def data_files(): | ||
files = [str(f) for f in Path(sources_dir, "data").glob("*") if f.is_file()] | ||
return [('actions_gui-data', files)] | ||
|
||
|
||
def long_description(): | ||
return Path("README.md").read_text() | ||
|
||
|
||
# make the distribution platform dependent | ||
try: | ||
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel | ||
class bdist_wheel(_bdist_wheel): | ||
def finalize_options(self): | ||
_bdist_wheel.finalize_options(self) | ||
self.root_is_pure = False | ||
# self.plat_name_supplied = True | ||
# self.plat_name = "manylinux1_x86_64" | ||
except ImportError: | ||
bdist_wheel = None | ||
|
||
|
||
setuptools.setup( | ||
name="actions_gui", | ||
version=version(), | ||
author="remico", | ||
author_email="[email protected]", | ||
description="simple ui for a limited set of github actions", | ||
long_description=long_description(), | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/remico/actions", | ||
project_urls={ | ||
"Source Code": "https://github.com/remico/actions", | ||
"Documentation": "https://github.com/remico/actions/wiki" | ||
}, | ||
packages=setuptools.find_packages(where=sources_dir, | ||
exclude=['sndbx']), | ||
package_dir={ | ||
'': sources_dir | ||
}, | ||
package_data={ | ||
'': ['VERSION', | ||
'ui/*', | ||
'ui/*/*', | ||
'assets/*'] | ||
}, | ||
data_files=data_files(), | ||
# py_modules=[], | ||
# register executable <command>=<pkg>.<module>:<attr> | ||
entry_points={ | ||
'gui_scripts': ['ghactions = actions_gui.main:main'] | ||
}, | ||
classifiers=[ | ||
"Development Status :: 2 - Pre-Alpha", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: POSIX :: Linux", | ||
], | ||
python_requires='>=3.8', | ||
install_requires=[ | ||
# 'PySide2', | ||
# 'requests', | ||
], | ||
license='MIT', | ||
platforms=['POSIX'], | ||
cmdclass={'bdist_wheel': bdist_wheel}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2020.10.30.dev2301 |
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
from os import getenv | ||
from pathlib import Path | ||
|
||
__all__ = ['path'] | ||
|
||
|
||
class path(str): | ||
def __new__(cls, *other): | ||
root = Path(__package__).absolute() | ||
root = Path(__file__).parent.resolve() | ||
return str.__new__(cls, root.joinpath(*other)) | ||
|
||
def join(self, *other): | ||
return path(Path(self).joinpath(self, *other)) | ||
|
||
@staticmethod | ||
def home(): | ||
return path(getenv('HOME')) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.