5
5
import fnmatch
6
6
import os
7
7
import sys
8
- from os import path
9
8
10
- with open (path .join (path .dirname (__file__ ), 'VERSION' )) as v :
9
+ with open (os . path .join (os . path .dirname (__file__ ), 'VERSION' )) as v :
11
10
VERSION = v .readline ().strip ()
12
11
13
12
with open ('requirements.txt' ) as reqs_file :
16
15
with open ('test-requirements.txt' ) as reqs_file :
17
16
test_requirements = reqs_file .read ().splitlines ()
18
17
18
+ with open ('README.md' ) as rm_file :
19
+ long_description = rm_file .read ()
20
+
19
21
20
22
class build_py (_build_py ):
21
23
22
24
def run (self ) -> None :
23
- init = path .join (self .build_lib , 'git' , '__init__.py' )
24
- if path .exists (init ):
25
+ init = os . path .join (self .build_lib , 'git' , '__init__.py' )
26
+ if os . path .exists (init ):
25
27
os .unlink (init )
26
28
_build_py .run (self )
27
29
_stamp_version (init )
@@ -32,10 +34,10 @@ class sdist(_sdist):
32
34
33
35
def make_release_tree (self , base_dir : str , files : Sequence ) -> None :
34
36
_sdist .make_release_tree (self , base_dir , files )
35
- orig = path .join ('git' , '__init__.py' )
36
- assert path .exists (orig ), orig
37
- dest = path .join (base_dir , orig )
38
- if hasattr (os , 'link' ) and path .exists (dest ):
37
+ orig = os . path .join ('git' , '__init__.py' )
38
+ assert os . path .exists (orig ), orig
39
+ dest = os . path .join (base_dir , orig )
40
+ if hasattr (os , 'link' ) and os . path .exists (dest ):
39
41
os .unlink (dest )
40
42
self .copy_file (orig , dest )
41
43
_stamp_version (dest )
@@ -82,7 +84,7 @@ def build_py_modules(basedir: str, excludes: Sequence = ()) -> Sequence:
82
84
name = "GitPython" ,
83
85
cmdclass = {'build_py' : build_py , 'sdist' : sdist },
84
86
version = VERSION ,
85
- description = "Python Git Library " ,
87
+ description = """GitPython is a python library used to interact with Git repositories"" " ,
86
88
author = "Sebastian Thiel, Michael Trier" ,
87
89
88
90
license = "BSD" ,
@@ -96,6 +98,7 @@ def build_py_modules(basedir: str, excludes: Sequence = ()) -> Sequence:
96
98
tests_require = requirements + test_requirements ,
97
99
zip_safe = False ,
98
100
long_description = """GitPython is a python library used to interact with Git repositories""" ,
101
+ long_description_content_type = "text/markdown" ,
99
102
classifiers = [
100
103
# Picked from
101
104
# http://pypi.python.org/pypi?:action=list_classifiers
0 commit comments