0

I have a python3 code with the following tree.

ptbl/
├── dialogue.py
├── elem_H.py
├── elems.db
├── __init__.py
├── __init__.py.in
├── __main__.py
├── main.py
├── menu.py
├── __pycache__
├── retrive.py
└── veggards.py
data/
├── icons
├── Makefile
├── Makefile.am
├── Makefile.in
├── menubar.ui
├── org.example.ptbl.gschema.valid
├── org.example.ptbl.gschema.xml
├── ptbl.desktop
├── ptbl.desktop.in
└── ui
bin/
├── ptbl
└── ptbl.in

I have never used setup.py, and from the tree, you can see that I was working with autotools.

I have generate a basic setup.py, but it is not including anything from data, bin or the ptbl/elems.db:

my steup.py is:

from setuptools import setup, find_packages
setup(
  name="ptbl",
  version="0.4",
  packages=find_packages(),
  package_data={
    'ptbl': ["data/"],
  },
)

which is making the dist:

.
├── PKG-INFO
├── ptbl
│   ├── dialogue.py
│   ├── elem_H.py
│   ├── __init__.py
│   ├── __main__.py
│   ├── main.py
│   ├── menu.py
│   ├── retrive.py
│   └── veggards.py
├── ptbl.egg-info
│   ├── dependency_links.txt
│   ├── PKG-INFO
│   ├── SOURCES.txt
│   └── top_level.txt
├── setup.cfg
└── setup.py

What should I do to include other files? I have checked other similar questions here, e.g. this but can't solve the problem.

1 Answer 1

1

List files or patterns:

package_data={
    'ptbl': ["bin/*", "data/*"],
},
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.