瀏覽代碼

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',