Skip to content

Commit

Permalink
FIX: optimization of auto-version entry when deploying to PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
nnako committed Jun 13, 2023
1 parent ffb6d3e commit c6bdc84
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
18 changes: 11 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
from setuptools import setup

# get long description for display within PyPi
# get long description that is used within the README file of this project
# (available on the GitHub platform) for display within PyPi platform

with open("README.rst", "r") as fh:
long_description = fh.read()

# for obtaining current version information,
# the local freeplane code file is to be consulted,
# prior to its installation on the local system
# for obtaining current version information directly from the source code, the
# local freeplane code file is to be consulted, prior to its installation on
# the local system. as it seems that at this point of the operation no LXML
# package is available (although it had previously been installed), its import
# statement within freeplane.py must be held in try / except clause.

#import src.freeplane as freeplane
import src.freeplane as freeplane

# do the settings for PyPi
setup(
name='freeplane-io',
#version=freeplane.__version__,
version="0.7.2",
#version="0.7.2",
version=freeplane.__version__,
py_modules=['freeplane'],
author='nnako',
author_email='[email protected]',
Expand Down
10 changes: 8 additions & 2 deletions src/freeplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,16 @@
import logging

# xml format
import lxml.etree as ET
try:
import lxml.etree as ET
except:
print("at this point, lxml package is not available. shouldn't be a problem, though.")

# html format
import html2text
try:
import html2text
except:
print("at this point, html2text package is not available. shouldn't be a problem, though.")


# version
Expand Down

0 comments on commit c6bdc84

Please sign in to comment.