소스 검색

github2pypi is optional

Kentaro Wada 6 년 전
부모
커밋
dcfeb3e937
1개의 변경된 파일4개의 추가작업 그리고 6개의 파일을 삭제
  1. 4 6
      setup.py

+ 4 - 6
setup.py

@@ -96,16 +96,14 @@ if sys.argv[1] == 'release':
 def get_long_description():
     with open('README.md') as f:
         long_description = f.read()
-
     try:
         import github2pypi
-    except ImportError:
+        return github2pypi.replace_url(
+            slug='wkentaro/labelme', content=long_description
+        )
+    except Exception:
         return long_description
 
-    return github2pypi.replace_url(
-        slug='wkentaro/labelme', content=long_description
-    )
-
 
 setup(
     name='labelme',