Skip to content

Commit

Permalink
Install data_files in share folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Wilhelm authored and Florian Wilhelm committed Mar 20, 2015
1 parent 5e7aed7 commit 4002a8e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Version 2.1, 2015-??-??

- Use alabaster as default Sphinx theme
- Automatically install Sphinx if necessary
- FIX: data_files are installed in share/PACKAGE instead of root

Version 2.0.4, 2015-03-17
=========================
Expand Down
3 changes: 2 additions & 1 deletion pyscaffold/data/setup_py.template
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ def setup_package():
# Some helper variables
version = get_versions()["version"]
docs_path = os.path.join(__location__, "docs")
data_file_path = os.path.join("share", package)
docs_build_path = os.path.join(docs_path, "_build")
install_reqs = get_install_requirements("requirements.txt")
metadata, console_scripts = read_setup_cfg()
Expand Down Expand Up @@ -526,7 +527,7 @@ def setup_package():
cmdclass=cmdclass,
tests_require=['pytest-cov', 'pytest'],
package_data={package: metadata['package_data']},
data_files=[('.', metadata['data_files'])],
data_files=[(data_file_path, metadata['data_files'])],
command_options=command_options,
entry_points={'console_scripts': console_scripts},
zip_safe=False) # do not zip egg file after setup.py install
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ def setup_package():
# Some helper variables
version = get_versions()["version"]
docs_path = os.path.join(__location__, "docs")
data_file_path = os.path.join("share", package)
docs_build_path = os.path.join(docs_path, "_build")
install_reqs = get_install_requirements("requirements.txt")
metadata, console_scripts = read_setup_cfg()
Expand Down Expand Up @@ -525,7 +526,7 @@ def setup_package():
cmdclass=cmdclass,
tests_require=['pytest-cov', 'pytest'],
package_data={package: metadata['package_data']},
data_files=[('.', metadata['data_files'])],
data_files=[(data_file_path, metadata['data_files'])],
command_options=command_options,
entry_points={'console_scripts': console_scripts},
zip_safe=False) # do not zip egg file after setup.py install
Expand Down

0 comments on commit 4002a8e

Please sign in to comment.