🔧 ConfigProvider added in builder

This commit is contained in:
ful1e5 2020-10-08 11:04:47 +05:30
parent 3bdbf285b0
commit f4d64e6ce6
8 changed files with 61 additions and 0 deletions

1
.gitignore vendored
View file

@ -2,6 +2,7 @@
# Out Dir
bitmaps
themes
test.py
# Logs Files
build.log

1
MANIFEST.in Normal file
View file

@ -0,0 +1 @@
recursive-include builder/windows.inf

4
builder/__init__.py Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__: str = "1.0.1"

32
builder/provider.py Normal file
View file

@ -0,0 +1,32 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import builder
from os import path
import shutil
class ConfigProvider(object):
"""
Configure `Bibata` building process.
"""
def __init__(self, bitmaps_dir: str, out_dir: str) -> None:
self._bitmaps_dir: str = bitmaps_dir
self._out_dir: str = out_dir
if (path.isdir(out_dir)):
shutil.rmtree(out_dir)
os.mkdir(out_dir)
def get_windows_script(self, theme_name: str, author: str) -> str:
with open(path.join(builder.__path__[0], "windows.inf")) as f:
data = f.read()
inf_content = data.replace(
"<inject_theme_name>", theme_name+" Cursors").replace("<inject_author_name>", author)
return inf_content

View file

23
setup.py Normal file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from builder import __version__
from setuptools import setup, find_namespace_packages
setup(
name="builder",
version=__version__,
description="Bibata theme builder 📦",
url="https://github.com/ful1e5/Bibata_Cursor/",
author="Kaiz Khatri",
author_email="kaizmandhu@gmail.com",
install_requires=["Pillow>=7.2.0", "clickgen>=1.1.7"],
packages=find_namespace_packages(include=['builder']),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
],
python_requires=">=3.6",
include_package_data=True,
zip_safe=False,
)