A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/lancopku/pkuseg-python/commit/d581c95e3ddec3f236ebe74fd626b6e1cfe112ee below:

fix cython import · lancopku/pkuseg-python@d581c95 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+13

-4

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+13

-4

lines changed Original file line number Diff line number Diff line change

@@ -1,10 +1,14 @@

1 1

import setuptools

2 +

import os

2 3

from distutils.extension import Extension

3 4 4 5

import numpy as np

5 -

from Cython.Build import cythonize

6 + 7 +

def is_source_release(path):

8 +

return os.path.exists(os.path.join(path, "PKG-INFO"))

6 9 7 10

def setup_package():

11 +

root = os.path.abspath(os.path.dirname(__file__))

8 12 9 13

long_description = "pkuseg-python"

10 14

@@ -26,10 +30,15 @@ def setup_package():

26 30

include_dirs=[np.get_include()],

27 31

),

28 32

]

33 + 34 +

if not is_source_release(root):

35 +

from Cython.Build import cythonize

36 +

extensions = cythonize(extensions, annotate=True)

37 + 29 38 30 39

setuptools.setup(

31 40

name="pkuseg",

32 -

version="0.0.22",

41 +

version="0.0.25",

33 42

author="Lanco",

34 43

author_email="luoruixuan97@pku.edu.cn",

35 44

description="A small package for Chinese word segmentation",

@@ -43,9 +52,9 @@ def setup_package():

43 52

"License :: Other/Proprietary License",

44 53

"Operating System :: OS Independent",

45 54

],

46 -

install_requires=["numpy>=1.16.0"],

55 +

install_requires=["cython", "numpy>=1.16.0"],

47 56

setup_requires=["cython", "numpy>=1.16.0"],

48 -

ext_modules=cythonize(extensions, annotate=True),

57 +

ext_modules=extensions,

49 58

zip_safe=False,

50 59

)

51 60

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4