How to get setuptools to follow symbolic links?

I am trying to configure a python package for distribution. I haven't done this before, so I'm pretty foggy regarding best practices or even how to get everything to work, and I had a problem. My project structure is as follows:

ROIWidgets/
    MANIFEST.in
    setup.py
    setup.cfg
    ROIWidgets/
        __init__.py
    static/
        widgets/
            js -> <symlink to folder containing JavaScript files>

The problem is that the JS files are under static. I started with distutils. I have included this line in MANIFEST.in:

recursive-include static *

... and this caused JS to be included in the package. Nice. Then I read that if I want my script installation to automatically install dependencies, I need to use setuptools, not distutils. So, I switched: I import setupfrom setuptools, not distutils. But now, when I say setup.py sdistthis line appears on the output:

warning: no files found matching '*' under directory 'static'

... JS . setuptools/__init__.py. :

def findall(dir = os.curdir):
    """Find all files under 'dir' and return the list of full filenames
    (relative to 'dir').
    """
    all_files = []
    for base, dirs, files in os.walk(dir):
        if base==os.curdir or base.startswith(os.curdir+os.sep):
            base = base[2:]
        if base:
            files = [os.path.join(base, f) for f in files]
        all_files.extend(filter(os.path.isfile, files))
    return all_files

distutils.filelist.findall = findall    # fix findall bug in distutils.

os.walk . , setuptools findall js. distutils findall os.walk - . , distutils findall , . os.walk(dir, followlinks=True), , , , ?

, . , , distutils setuptools, .

?

+4
1

, -, (, , ).

.

, , setuptools - 8.0.2.

0

All Articles