0

I actually tried following this guide, but it did not work for me(I believe it's only for python 2 since I got a ton of errors and tried fixing them but it wasn't working still, I'm trying to do this for python 3)

set file permissions in setup.py file

So basically I have a folder in lets say

/usr/lib/python3.6/site_packages/XYZ

I want to give XYZ read & write permissions, since the current permissions only give root user write access. In my documentation I can require each user that installs my program through pip to chmod the directory themselves, but I'm looking for a more convenient way so no one has to do that.

Here's my setup.py incase anyone wants to see it

from distutils.core import setup

setup(
  name = 'graphite-analytics',
  packages = ['graphite'],
  package_data={
    'graphite' : ['graphite.py', 'capture.j3', 'templates/css/styles.css', 'templates/js/Chart.PieceLabel.js', 'templates/html/render.html', 'templates/fonts/Antro_Vectra.otf', 'templates/images/Calendar-icon.png'],
  },
  version = '0.1.2.13',
  description = 'Create a print-out template for your google analytics data',
  author = 'NAME REDACTED',
  author_email = 'EMAIL REDACTED',
  url = 'https://github.com/ARM-open/Graphite',
  include_package_data=True,
  zip_safe=True,
  classifiers = [],
  keywords = ['Google analytics', 'analytics', 'templates'], 
  install_requires=['Click', 'google-api-python-client', 'jinja2'],
  entry_points={'console_scripts': [
    'graphite-analytics = graphite.graphite:main'
  ]}
)
adriam
  • 431
  • 3
  • 8
  • 16
  • Maybe a [post-install script](https://stackoverflow.com/q/20288711/223424) would help you? – 9000 Jul 19 '17 at 15:46
  • @9000 Looks like that may just work, only issue is how would I get the XYZ directory with the post install script? – adriam Jul 19 '17 at 15:52

0 Answers0