mirror of
https://github.com/openkmip/pykmip
synced 2025-12-15 07:43:26 +00:00
Fixing relative path bug when looking up library version
This change fixes the use of relative paths used to fetch the PyKMIP library version number in kmip/__init__.py and setup.py. The absolute path of the file is now dynamically generated and used instead. Tests are included to verify that the __version__ attribute is set properly.
This commit is contained in:
5
setup.py
5
setup.py
@@ -13,9 +13,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
import setuptools
|
||||
|
||||
exec(open('kmip/version.py').read())
|
||||
version = os.path.join(os.path.dirname(
|
||||
os.path.realpath(__file__)), 'kmip', 'version.py')
|
||||
exec(open(version).read())
|
||||
|
||||
setuptools.setup(
|
||||
name='PyKMIP',
|
||||
|
||||
Reference in New Issue
Block a user