Skip to content

Commit

Permalink
Removed extra function from setup.py
Browse files Browse the repository at this point in the history
Removed the install_scripts_and_symlinks function from setup.py. This
appears to be attempting to link executable scripts to somewhere or
some nonsense. Whatever. It totally breaks on *nix systems without
elevated privileges and it isn’t even the correct way to do what it is
trying to do.

Also, the package still seems to work with it removed. So… Gonzo.
  • Loading branch information
rmkraus committed Jan 14, 2016
1 parent 59d157d commit 0a565e7
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,8 @@
import os.path
from setuptools import setup, find_packages
from distutils.command.install_scripts import install_scripts

from distutils.core import setup

class install_scripts_and_symlinks(install_scripts):
'''Like install_scripts, but also replicating nonexistent symlinks'''
def run(self):
print ("=============install_scripts_and_symlinks run")
install_scripts.run(self)
# Replicate symlinks if they don't exist
print (self)
print ("data_files = ", dir( self.distribution.data_files))
print (type(self.distribution.data_files))
print (self.distribution.data_files)
for script in self.distribution.scripts:
print ("\n---script = ",script)
if os.path.islink(script):
target = os.readlink(script)
newlink = os.path.join(self.install_dir, os.path.basename(script))
if not os.path.exists(newlink):
print ("++++++++++", target, " -> ", newlink)
os.symlink(target, newlink)


setup(
name='lnetatmo',
Expand All @@ -38,6 +18,5 @@ def run(self):
url='https://github.com/philippelt/netatmo-api-python',
license='Open Source',
description='Simple API to access Netatmo weather station data from any python script.',
long_description=open('README.md').read(),
cmdclass = { 'install_scripts': install_scripts_and_symlinks }
long_description=open('README.md').read()
)

0 comments on commit 0a565e7

Please # to comment.