Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
*.swp
build
dist
lunardate.egg-info/PKG-INFO
lunardate.egg-info
8 changes: 0 additions & 8 deletions lunardate.egg-info/SOURCES.txt

This file was deleted.

1 change: 0 additions & 1 deletion lunardate.egg-info/dependency_links.txt

This file was deleted.

1 change: 0 additions & 1 deletion lunardate.egg-info/top_level.txt

This file was deleted.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools >= 77.0.3"]
Comment thread
lidaobing marked this conversation as resolved.
build-backend = "setuptools.build_meta"
18 changes: 15 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
#!/usr/bin/env python

from setuptools import setup, find_packages
import os
import re
Comment thread
lidaobing marked this conversation as resolved.

import lunardate
def get_version():
with open(
os.path.join(os.path.dirname(__file__), "lunardate.py"),
"r",
encoding="utf-8",
) as f:
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", f.read(), re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")

setup(name='lunardate',
version=lunardate.__version__,
version=get_version(),
py_modules = ['lunardate'],
description = 'A Chinese Calendar Library in Pure Python',
long_description = lunardate.__doc__,
long_description = open("README.md", "r", encoding="utf-8").read(),
Comment thread
lidaobing marked this conversation as resolved.
long_description_content_type="text/markdown",
author = 'LI Daobing',
author_email = 'lidaobing@gmail.com',
url = 'https://github.com/lidaobing/python-lunardate',
Expand Down
Loading