agdsn / hades

AG DSN Authentication and Authorization Infrastructure
MIT License
8 stars 3 forks source link

Develop install does not work (`pip install -e .`) #109

Closed lukasjuhrich closed 2 years ago

lukasjuhrich commented 2 years ago

pip install -e . gives me the following stacktrace:

Stacktrace ``` × python setup.py develop did not run successfully. │ exit code: 1 ╰─> [55 lines of output] running develop /home/lukas/.virtualenvs/hades/lib/python3.10/site-packages/setuptools/command/easy_install.py:160: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( /home/lukas/.virtualenvs/hades/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build_exe cc -std=c11 -pipe -Wall -Wextra -Werror -D_XOPEN_SOURCE=700 -c src/hades/bin/hades-dhcp-script.c -o build/temp.linux-x86_64-3.10/src/hades/bin/hades-dhcp-script.o cc build/temp.linux-x86_64-3.10/src/hades/bin/hades-dhcp-script.o -o build/lib.linux-x86_64-3.10/hades-dhcp-script running egg_info writing src/hades.egg-info/PKG-INFO writing dependency_links to src/hades.egg-info/dependency_links.txt writing entry points to src/hades.egg-info/entry_points.txt writing requirements to src/hades.egg-info/requires.txt writing top-level names to src/hades.egg-info/top_level.txt reading manifest file 'src/hades.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'src/hades/logging.ini' adding license file 'LICENSE' writing manifest file 'src/hades.egg-info/SOURCES.txt' running build_ext Creating /home/lukas/.virtualenvs/hades/lib/python3.10/site-packages/hades.egg-link (link to src) Adding hades 0.4.0 to easy-install.pth file Installing hades-agent script to /home/lukas/.virtualenvs/hades/bin Installing hades-check-database script to /home/lukas/.virtualenvs/hades/bin Installing hades-deputy script to /home/lukas/.virtualenvs/hades/bin Installing hades-dhcp-script-standalone script to /home/lukas/.virtualenvs/hades/bin Installing hades-export-options script to /home/lukas/.virtualenvs/hades/bin Installing hades-generate-config script to /home/lukas/.virtualenvs/hades/bin Installing hades-lease-server script to /home/lukas/.virtualenvs/hades/bin Installing hades-portal script to /home/lukas/.virtualenvs/hades/bin Installing hades-vrrp-notify script to /home/lukas/.virtualenvs/hades/bin Installed /home/lukas/code/10ag/hades/src Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/home/lukas/code/10ag/hades/setup.py", line 156, in setup(name='hades', File "/home/lukas/.virtualenvs/hades/lib/python3.10/site-packages/setuptools/__init__.py", line 155, in setup return distutils.core.setup(**attrs) File "/home/lukas/.virtualenvs/hades/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup return run_commands(dist) File "/home/lukas/.virtualenvs/hades/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_commands dist.run_commands() File "/home/lukas/.virtualenvs/hades/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands self.run_command(cmd) File "/home/lukas/.virtualenvs/hades/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "/home/lukas/.virtualenvs/hades/lib/python3.10/site-packages/setuptools/command/develop.py", line 34, in run self.install_for_development() File "/home/lukas/code/10ag/hades/setup.py", line 150, in install_for_development os.path.join(self.build_platlib, executable.sources), File "/home/lukas/.virtualenvs/hades/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 103, in __getattr__ raise AttributeError(attr) AttributeError: build_platlib [end of output] ```

The error is caused by the following access to self.buid_platlib: https://github.com/agdsn/hades/blob/78782831b840188b14e37c0673a6d6e9712f64ce/setup.py.in#L144-L153

I am not sure at what point in time this worked. Changelogs of setuptools or python did not mention this attribute. I have cloned seutptools and haven't found any diff occurence of build_platlib since 2009, so any relevant change must have happened inside pythons distutils.

lukasjuhrich commented 2 years ago

Fixed in 9e2a11cbbb360c08b8d5fb12cf934e5ebc4caf0b, 09bbe520df6a2e60966d54c942d5b3297621249c, f3279a33c543252481221e97bc92b37009de2068