#๐Ÿ”’ Importing non-py files and folders during install

6 messages ยท Page 1 of 1 (latest)

acoustic sage
#

I'm having trouble getting my non-py files and folders into the installed program. Nothing seems to work, only .py files appear in the install directory. I'm installing my python program via pip3 install .

My setup.py:

from setuptools import setup

setup(
   name='pet_project',
   version='0.1',
   license='MIT',
   long_description=open('README.md').read(),
   packages=['pet_project'],
   package_data={
      'pet_project': [
         'py.typed',
         'data/**',
         'node_modules/**',
         'package.json'
      ],
      'js_components':['*.js'],
      'node_modules':['**'],
      '':['data']
   },
   entry_points={
    'console_scripts':['pet_project=pet_project.__main__:main']
   }
)

My project structure:

|__pet_project
|     |__ .py files
|
|__js_components
|.    |__ .js files
|
|__node_modules
|__package.json
|__data

What am I doing wrong?

coarse flareBOT
#

@acoustic sage

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

acoustic sage
#

Hm, didn't work. My installation directory still contains only python files...

My MANIFEST.in:

include package.json
include data
recursive-include node_modules/*
coarse flareBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.