Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Second proposed fix for the broken top_level.txt #573

Merged
merged 1 commit into from
Jan 27, 2016

Conversation

alexamici
Copy link
Contributor

Minimal change that should fix #571. This time for real.

Minimal change that should fix RDFLib#571. This time for real.
@joernhees joernhees added enhancement New feature or request meta Relates primarily to the project and not users of the project. labels Jan 25, 2016
@joernhees joernhees added this to the rdflib 4.2.2 milestone Jan 25, 2016
@joernhees
Copy link
Member

sorry for asking, but can you point me to where it explicitly says we shouldn't use /? i tried finding something normative but failed...

@alexamici
Copy link
Contributor Author

The relevant section is the one that I quoted in #571, you are supposed to include module names (dotted format) not folder paths and only top level modules. In fact setuptools drop all non top level module names and with my patch the top_level.txt file only include rdflib.

I noticed because for a project of mine I parsed the top_level.txt file of around a hundred projects and only rdflib and another project didn't conform to the documentation.

Finally, most projects just use setuptools.find_packages that does the job fine. Unless you have a reason not to, I'd advise you to use it as well. I can update the current PR if you wish.

@alexamici
Copy link
Contributor Author

The Listing whole packages section of Writing the Setup Script of the main distutil documentation is also relevant.

The packages option tells the Distutils to process (build, distribute, install, etc.) all pure Python modules found in each package mentioned in the packages list. In order to do this, of course, there has to be a correspondence between package names and directories in the filesystem. The default correspondence is the most obvious one, i.e. package distutils is found in the directory distutils relative to the distribution root."

@joernhees
Copy link
Member

Finally, most projects just use setuptools.find_packages that does the job fine. Unless you have a reason not to, I'd advise you to use it as well. I can update the current PR if you wish.

if this works, i would happily accept it... not really keen on manually doing stuff that can be done automatically... the setup process of rdflib grew and was tweaked over many years, so any simplification is welcome.

for now i'll accept this pull request, as what we currently do seems to be weird...

joernhees added a commit that referenced this pull request Jan 27, 2016
fix for the broken top_level.txt
@joernhees joernhees merged commit d1a530e into RDFLib:master Jan 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in-resolution meta Relates primarily to the project and not users of the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken top_level.txt file in distribution
2 participants