ShutdownRepo / httpmethods

HTTP verb tampering & methods enumeration
GNU General Public License v3.0
51 stars 10 forks source link

Error on Installation by setuptools #8

Open varmakollu opened 11 months ago

varmakollu commented 11 months ago

Hey buddy when i try out the tool I got error on setup as

python3 setup.py install              

error: Multiple top-level packages discovered in a flat-layout: ['assets', 'wordlists'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names

To find more information, look for "package discovery" on setuptools docs.

The error you're encountering indicates that setuptools has found multiple top-level packages in your project, specifically 'assets' and 'wordlists'

ShutdownRepo commented 11 months ago

Hi, can you try again with this setup.py content, and tell me if it works?

import shutil
import os
from setuptools import setup

with open('README.md', 'r', encoding='utf-8') as f:
    long_description = f.read()

with open('requirements.txt', 'r', encoding='utf-8') as f:
    content = f.readlines()
    requirements = [x.strip() for x in content]

shutil.copyfile('httpmethods.py', 'httpmethods')

setup(
    name='httpmethods',
    version='1.1.0',
    author='Shutdown',
    description='HTTP verb tampering & methods enumeration  ',
    long_description=long_description,
    long_description_content_type='text/markdown',
    url='https://github.com/ShutdownRepo/httpmethods',
    classifiers=[
        'Environment :: Console'
        'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python :: 3',
        'Topic :: Security',
    ],
    python_requires='>=3.6',
    install_requires=requirements,
    scripts=['httpmethods'],
    py_modules=[]
)

os.remove('httpmethods')
varmakollu commented 11 months ago

Thanks Buddy it's working again but issue are deprecation warnings related to the use of setup.py and easy_install. continuing to use them may result in compatibility issues.

/usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

      ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer, pypa/build or
        other standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

/usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

consider updating the setup to use the recommended tools (pypa/build, pypa/installer, or pip).

python -m pip install .