16

I have a Python package with a standard setup.py installer but I cannot for the life of me get it to install some pre-defined configuration files into site-packages somewhere... my setup() function is called like this:

setup(
  name='Hydrant',
  version=version,
  description=long_description,
  author='Scott Frazer',
  author_email='scott.d.frazer@gmail.com',
  packages=['hydrant'],
  package_data={'hydrant': ['sql/*.sql', 'hydrant.conf', 'hydrant.deploy']},
  data_files=[('config', ['hydrant/hydrant.conf'])],
  install_requires=[
    "xtermcolor>=1.0.3",
    "pyyaml",
    "pymysql",
    "jprops"
  ],
  entry_points={
    'console_scripts': [
      'hydrant = hydrant.Main:Cli'
    ]
  },
  test_suite='hydrant.test',
  license = "MIT",
)

I was experimenting around with package_data and data_files but they simply don't seem to DO anything. I'm installing into a virtual environment with the command line:

$ python setup.py install

Any insight would be greatly appreciated!

Scott Frazer
  • 2,145
  • 2
  • 23
  • 36
  • 1
    possible duplicate of [Including non-Python files with setup.py](http://stackoverflow.com/questions/1612733/including-non-python-files-with-setup-py) – Federico Apr 14 '14 at 18:56

1 Answers1

2

Try adding a MANIFEST.in file to your module. Althought AFAIK it's only used to add data to generated packages (eggs or tar.gz distribution files)
Look at this StackOverflow related question/answer.

Others programmers made it work switching to distutils, but i wouldn't recommend it since it's deprecated by distribute.
Look at this other StackOverflow related question/answer

Community
  • 1
  • 1
KurzedMetal
  • 12,540
  • 6
  • 39
  • 65