Situation
I createt my setup.py file. Most of it works out of the box but I'm having some trouble by shipping some additional files with it. But I noticed that the following files are not included to my tar.gz when running
python setup.py sdist
- doc files
- virtual files
- service script
The location of the doc files can be os specific. But I would like to see the service script in /etc/init.d/ and a sample configuration (stored in my doc files) in /etc/package. The virtual files can be stored in my package folder.
Question
How can I ship those files in my tar.gz?
Source
setup.py
from setuptools import setup
setup(
name="package",
version="0.1",
description="package Daemon",
author="me",
author_email="my-email",
url="http://my-url",
package_dir={"package": "src",
"package-utils": "src/utils"},
packages=[
"package",
"package.modules",
"package.modules.core",
"package.modules.config",
"package.modules.commands",
"package.modules.dblog",
"package.utils",
"twisted.plugins",
],
package_data={
"package": [
"src/virtual/cmd/bin/*",
"src/virtual/cmd/sbin/*",
"src/virtual/usr/bin/*",
"src/virtual/files/etc/*",
"src/virtual/proc/*",
"src/virtual/*.db"]},
data_files=[
("/usr/local/doc/package", ["doc/COPYRIGHT",
"doc/LICENCE",
"doc/README",
"doc/sql/mysql.sql",
"doc/package.cfg.sample"]),
("/etc/init.d/", ["src/package"]),
("/etc/package", ["doc/package.cfg.sample"])
],
entry_points={
'console_scripts': [
['package-setup = package.utils.setup:main'],
],
},
)
try:
from twisted.plugin import IPlugin, getPlugins
except ImportError:
pass
else:
list(getPlugins(IPlugin))
tree -d
.
├── doc
│ └── sql
├── src
│ ├── virtual
│ │ ├── cmd
│ │ │ ├── bin
│ │ │ ├── sbin
│ │ │ └── usr
│ │ │ └── bin
│ │ └── files
│ │ ├── etc
│ │ └── proc
│ ├── modules
│ │ ├── commands
│ │ ├── config
│ │ ├── core
│ │ └── dblog
│ └── utils
└── twisted
└── plugins