-
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.
- Loading branch information
1 parent
d9da643
commit 371f6fd
Showing
1 changed file
with
5 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,23 @@ | ||
from setuptools import find_packages, setup | ||
import subprocess | ||
import os | ||
from setuptools import setup, find_packages | ||
|
||
pandalog_version = ( | ||
subprocess.run(["git", "describe", "--tags"], stdout=subprocess.PIPE) | ||
.stdout.decode("utf-8") | ||
.strip() | ||
) | ||
|
||
if "-" in pandalog_version: | ||
v,i,s = pandalog_version.split("-") | ||
pandalog_version = v + "+" + i + ".git." + s | ||
|
||
assert "-" not in pandalog_version, "Invalid version string: %s" % pandalog_version | ||
assert "." in pandalog_version, "Invalid version string: %s" % pandalog_version | ||
|
||
with open("pandalog/VERSION", "w", encoding="utf-8") as fh: | ||
fh.write("%s\n" % pandalog_version) | ||
pandalog_version = '1.0.1' | ||
|
||
with open("README.md", "r", encoding="utf-8") as fh: | ||
long_description = fh.read() | ||
|
||
|
||
setup( | ||
name='pandalog', | ||
packages=find_packages(include=['pandalog']), | ||
version=pandalog_version, | ||
description='A simple library for logging in Python', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
author='Possible Panda', | ||
classifiers=[ | ||
classifiers=[ | ||
'Development Status :: 3 - Alpha', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python :: 3.12', | ||
], | ||
package_data={"pandalog": ["VERSION"]}, | ||
include_package_data=True, | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/PossiblePanda/pandalog", | ||
install_requires=["colorama"], | ||
) |