mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-29 03:13:47 +01:00
Use setuptools.setup console_scripts entry point.
- Switch to distributing pywal as a module and having setuptools register the script as an console_script entry point. - Added python_requires field to setuptools.setup. - Use the module version as the package version.
This commit is contained in:
parent
9930a18a34
commit
e4fd761052
@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""
|
"""
|
||||||
wal - Generate and change colorschemes on the fly.
|
wal - Generate and change colorschemes on the fly.
|
||||||
Created by Dylan Araps.
|
Created by Dylan Araps.
|
||||||
@ -12,9 +11,9 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
__version__ = "0.1.6"
|
||||||
|
|
||||||
# Internal variables.
|
# Internal variables.
|
||||||
VERSION = "0.1"
|
|
||||||
COLOR_COUNT = 16
|
COLOR_COUNT = 16
|
||||||
CACHE_DIR = pathlib.Path.home() / ".cache/wal/"
|
CACHE_DIR = pathlib.Path.home() / ".cache/wal/"
|
||||||
|
|
||||||
@ -102,7 +101,7 @@ def process_args(args):
|
|||||||
|
|
||||||
# -v
|
# -v
|
||||||
if args.v:
|
if args.v:
|
||||||
print(f"wal {VERSION}")
|
print(f"wal {__version__}")
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
# -i
|
# -i
|
||||||
@ -572,6 +571,3 @@ def main():
|
|||||||
# This saves 10ms.
|
# This saves 10ms.
|
||||||
# pylint: disable=W0212
|
# pylint: disable=W0212
|
||||||
# os._exit(0)
|
# os._exit(0)
|
||||||
|
|
||||||
|
|
||||||
main()
|
|
17
setup.py
17
setup.py
@ -1,6 +1,7 @@
|
|||||||
"""wal - setup.py"""
|
"""wal - setup.py"""
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
import pywal
|
||||||
|
|
||||||
DESC = (
|
DESC = (
|
||||||
"View the DOCS at: https://github.com/dylanaraps/pywal\n\n"
|
"View the DOCS at: https://github.com/dylanaraps/pywal\n\n"
|
||||||
@ -9,22 +10,30 @@ DESC = (
|
|||||||
)
|
)
|
||||||
DESC = "".join(DESC)
|
DESC = "".join(DESC)
|
||||||
|
|
||||||
|
version = pywal.__version__
|
||||||
|
download_url = f"https://github.com/dylanaraps/pywal/archive/{version}.tar.gz"
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pywal",
|
name="pywal",
|
||||||
version="0.1.6",
|
version=version,
|
||||||
author="Dylan Araps",
|
author="Dylan Araps",
|
||||||
author_email="dylan.araps@gmail.com",
|
author_email="dylan.araps@gmail.com",
|
||||||
description="🎨 Generate and change colorschemes on the fly",
|
description="🎨 Generate and change colorschemes on the fly",
|
||||||
long_description=DESC,
|
long_description=DESC,
|
||||||
license="MIT",
|
license="MIT",
|
||||||
url="https://github.com/dylanaraps/pywal",
|
url="https://github.com/dylanaraps/pywal",
|
||||||
download_url="https://github.com/dylanaraps/pywal/archive/0.1.6.tar.gz",
|
download_url=download_url,
|
||||||
scripts=["wal"],
|
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Environment :: X11 Applications",
|
"Environment :: X11 Applications",
|
||||||
"License :: OSI Approved :: MIT License",
|
"License :: OSI Approved :: MIT License",
|
||||||
"Operating System :: POSIX :: Linux",
|
"Operating System :: POSIX :: Linux",
|
||||||
"Programming Language :: Python :: 3.6",
|
"Programming Language :: Python :: 3.6",
|
||||||
]
|
],
|
||||||
|
packages=['pywal'],
|
||||||
|
entry_points={
|
||||||
|
"console_scripts": [
|
||||||
|
"wal=pywal:main"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
python_requires=">=3.6"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user