Skip to content

Commit a9842b4

Browse files
committed
fixes
1 parent 21265a9 commit a9842b4

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

MANIFEST.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
include src/*.h
22
include src/*.cpp
33
include src/*.c
4-
include README.md
4+
include README.md
5+
include readme.md
6+
include LICENSE

setup.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22
from pybind11.setup_helpers import Pybind11Extension, build_ext
33
import os
44

5+
# --- SAFE README READING ---
6+
# This block checks multiple common filenames and handles errors gracefully.
7+
# If no readme is found, it defaults to an empty string instead of crashing.
58
long_description = ""
6-
possible_readmes = ["README.md"] # stupid bug.
9+
possible_readmes = ["README.md", "readme.md", "README.txt"]
10+
711
for f in possible_readmes:
812
if os.path.exists(f):
9-
with open(f, "r", encoding="utf-8") as file:
10-
long_description = file.read()
11-
break
13+
try:
14+
with open(f, "r", encoding="utf-8") as file:
15+
long_description = file.read()
16+
break
17+
except:
18+
pass
19+
# ---------------------------
1220

1321
# Define the C++ extension
1422
ext_modules = [
@@ -25,22 +33,18 @@
2533

2634
setup(
2735
name="libbbf",
28-
version="0.2.2",
36+
version="0.2.3", # Bumped version to ensure a clean release
2937
author="EF1500",
3038
author_email="rosemilovelockofficial@proton.me",
3139
description="Bound Book Format (BBF) tools and bindings",
3240
long_description=long_description,
3341
long_description_content_type="text/markdown",
3442
url="https://github.com/ef1500/libbbf",
3543

36-
# This finds the 'libbbf_tools' folder
3744
packages=find_packages(),
38-
39-
# This compiles the C++ code
4045
ext_modules=ext_modules,
4146
cmdclass={"build_ext": build_ext},
4247

43-
# This creates the command line tools 'cbx2bbf' and 'bbf2cbx'
4448
entry_points={
4549
"console_scripts": [
4650
"cbx2bbf=libbbf_tools.cbx2bbf:main",
@@ -50,4 +54,4 @@
5054

5155
zip_safe=False,
5256
python_requires=">=3.11",
53-
)
57+
)

0 commit comments

Comments
 (0)