Skip to content

Commit ebc991f

Browse files
committed
fix: pypi
1 parent 91d7d58 commit ebc991f

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

CMakeLists.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,9 @@ find_package(Python3 COMPONENTS Development)
1111
include(GNUInstallDirs)
1212
find_package(PkgConfig)
1313

14-
15-
execute_process(COMMAND git describe --tags --long --always RESULT_VARIABLE RC_GIT_VER OUTPUT_VARIABLE GIT_VERSION)
16-
17-
if (${RC_GIT_VER} EQUAL 0)
18-
string(STRIP ${GIT_VERSION} GIT_VERSION)
19-
message("-- Version: " ${GIT_VERSION})
20-
add_definitions(-DVERSION=\"${GIT_VERSION}\")
21-
endif()
14+
file(READ "version" VERSION_CONTENTS)
15+
string(STRIP "${VERSION_CONTENTS}" VERSION)
16+
add_definitions(-DVERSION="${VERSION}")
2217

2318
set(SOURCE_FILES_CLIENT ydotool/ydotool.c ydotool/pydotool.c)
2419

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include CMakeLists.txt
2+
include version
3+
recursive-include ydotool *

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ def build_extensions(self):
5151
with open("README.md", "r") as fh:
5252
long_description = fh.read()
5353

54+
with open("version", "r") as version_file:
55+
version = version_file.read().strip()
56+
5457
setup(
5558
name='python-ydotool',
56-
version="v1.0.4",
59+
version=version,
5760
ext_modules=[
5861
CMakeExtension(name='_pydotool'),
5962
],
@@ -62,6 +65,7 @@ def build_extensions(self):
6265
'Bug Tracker': 'https://github.com/Antares0982/pydotool/issues',
6366
'Source Code': 'https://github.com/Antares0982/pydotool',
6467
},
68+
include_package_data=True,
6569
description='ydotool client implemented in Python',
6670
long_description=long_description,
6771
long_description_content_type='text/markdown',

version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v1.0.4.post1

0 commit comments

Comments
 (0)