Correct the path to pyproject.toml

This commit is contained in:
Micah Lee 2020-11-02 10:54:36 -08:00
parent 0065278539
commit 7965e674cf

View File

@ -22,9 +22,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# This setup.py file is used for flatpak packaging. For other packaging,
# OnionShare uses briefcase.
import os
import setuptools
with open("../pyproject.toml") as f:
with open(
os.path.join(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "pyproject.toml"
)
) as f:
for line in f.readlines():
if line.startswith("version = "):
version = line.split('"')[1]