From ec10e3db82ea89f123499d33e6fd3739060bf337 Mon Sep 17 00:00:00 2001 From: Martins Sipenko Date: Fri, 14 Feb 2025 08:57:34 +0200 Subject: [PATCH] Fixed build --- MANIFEST.in | 1 + setup.py | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 55e675e..6582d44 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,2 @@ include pysmarty2/registers/*.json +include requirements.txt diff --git a/setup.py b/setup.py index b17e60d..a2e7034 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,20 @@ """Setup for pysmarty2 package.""" +import os import setuptools - -with open("README.md", "r") as fh: +# Read README.md +with open("README.md", "r", encoding="utf-8") as fh: LONG_DESCRIPTION = fh.read() +# Ensure requirements.txt exists before reading it +if os.path.exists("requirements.txt"): + with open("requirements.txt", "r", encoding="utf-8") as f: + REQUIREMENTS = [line.strip() for line in f if line.strip()] +else: + REQUIREMENTS = [] + + setuptools.setup( name="pysmarty2", version="0.10.2",