Skip to content

Simplify pip packaging and remove cruft files#79

Open
Boruch-Baum wants to merge 1 commit intoideasman42:mainfrom
Boruch-Baum:packaging
Open

Simplify pip packaging and remove cruft files#79
Boruch-Baum wants to merge 1 commit intoideasman42:mainfrom
Boruch-Baum:packaging

Conversation

@Boruch-Baum
Copy link

Hi! I'm writing this pull request using nerd dictation. Last week, I had
surgery and have not been able to type with both hands so I looked for
an application like this and installed it. In the course of installing
I observed a few things that I could contribute and hence this pull
request. Thanks very much for putting this together; I hope
this contribution will be helpful; I have a few other ideas that I
can also potentially contribute.

My operating environment is Debian, using python 3.10. The following
is the default boilerplate that magit produced for me:

  • file setup.py had been placing the following files and directories
    in improper places as follows:

    • installed directory doc to ~/.local/lib/python3.10/site-packages/

    • installed executable nerd-dictation to
      ~/.local/lib/python3.10/site-packages/

    • installed directory nerd-dictation to ~/.local/lib/

    • installed executable and readme.rst to ~/.local/nerd-dictation/

  • file setup.py had NOT been performing the following:

    • installing directory doc to ~/.local/share/doc/nerd-dictation

      • installing documentation beyond readme.rst

      • installing example nerd-dictation.py files

    • installing executable nerd-dictation to ~/.local/bin

  • file setup.py suffered from needless complexity due to being placed
    in a sub folder instead of the based directory as is standard and
    expected practice

  • file pyproject.toml did not contain the minimum content as
    prescribed by package setuptools' documentation

    • this file exists only for the purpose of setuptools, so it was
      incongruous that it existed as it should, in the package root directory,
      even though the setup.py script to actually run setuptools was
      hidden in a sub-sub-folder.
  • a config file nerd-dictation.py is described as default, but had not been
    installed by default, so it wasn't really the default.

+ file setup.py had been placing the following files and directories
  in improper places as follows:

  + installed directory doc to ~/.local/lib/python3.10/site-packages/

  + installed executable nerd-dictation to
    ~/.local/lib/python3.10/site-packages/

  + installed directory nerd-dictation to ~/.local/lib/

  + installed executable and readme.rst to ~/.local/nerd-dictation/

+ file setup.py had NOT been performing the following:

  + installing directory doc to ~/.local/share/doc/nerd-dictation

    + installing documentation beyond readme.rst

    + installing example nerd-dictation.py files

  + installing executable nerd-dictation to ~/.local/bin

+ file setup.py suffered from needless complexity due to being placed
  in a sub folder instead of the based directory as is standard and
  expected practice

+ file pyproject.toml did not contain the minimum content as
  prescribed by package setuptools' documentation

  + this file exists only for the purpose of setuptools, so it was
    incongruous that it existed as it should, in the package root directory,
    even though the setup.py script to actually run setuptools was
    hidden in a sub-sub-folder.

+ a config file nerd-dictation.py is described as default, but had not been
  installed by default, so it wasn't really the default.
@ideasman42
Copy link
Owner

Hi thanks for the PR. Changes/improvements to setup.py are welcome, but please leave it in it's current location.

@Boruch-Baum
Copy link
Author

Boruch-Baum commented Jan 24, 2023 via email

@ideasman42
Copy link
Owner

In this case I rather leave it as is. If there are mistakes or problems with setup.py not working, that should be addressed, last I tested it seemed to work OK. But it should not be necessary to have this in the projects root directory.

Copy link
Owner

@ideasman42 ideasman42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrections to packaging should be split out from moving files to different location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants