Comments (22)
Oh man, now I'm getting error: can't copy 'man/pter.1': doesn't exist or not a regular file
even when building from git.
This happens when running python3 ./setup.py build && python3 ./setup.py install
What commands do you issue to build pter from git?
from pter.
I'm sorry, the error is slightly different, it's in regard to qpter, not pter. Sorry for the confusion.
No worries, I also missed that.
Here's the actual error:
error: can't copy 'man/pter/qpter.1': doesn't exist or not a regular file
Yeah, that was me fumbling the patch. There really is no man/pter/qpter.1
file, but a man/qpter.1
file. 🤦
Anyway, should be fixed with 12ea984a
from pter.
Tested with both setup.py
and with pip3
, you certainly did!
D'you think this issue can be closed?
Sure, it builds just fine now.
from pter.
Absolutely! Documentation on the terminal is very much required in my opinion. Just haven't released 3.16 yet.
from pter.
OK, seems like apt install python3-docutils
works around the issue, but shouldn't docutils
be fetched by setup.py somehow and/or listed as deps? And why doesn't the issue occur with https://vonshednob.cc/releases/?
from pter.
The tarball from my website has been produced with python -m build
, so it’s not just the source code, but contains the generated man page, too.
I was rather reluctant to add docutils as a build-time dependency -- the pter package on pypi and on the website, as well as the one in AUR (all the same file, from python -m build
) "just work". So adding docutils as a build-time dependency would be an unnecessary step. 🤔
How about adding a Development section to the README and add that type of information there?
from pter.
How about adding a Development section to the README and add that type of information there?
IMO, that would be fine. For the record, this is what I use to build pter inside a Docker image (based on Debian 12/Bookworm):
apt-get install --no-install-recommends -y \
python3.11-minimal python3-setuptools python3-docutils ca-certificates
cd /path/to/pter-source-dir && \
python3 ./setup.py build && python3 ./setup.py install
The package ca-certificates
is also needed on a minimal Debian install -- without it, no deps like pytodotxt
can be downloaded.
from pter.
Interesting, but I remember from my own experience with … uhm, something, that ca-certificates
surprisingly is not installed by default. But I guess it makes sense for containers, similar to not installing man pages.
from pter.
But I guess it makes sense for containers, similar to not installing man pages.
Yeah, this is inside the debian:bookworm-slim
image. I guess they save space by not installing ca-certificates
.
How about adding a Development section to the README and add that type of information there?
I've played with several build options recently and yes, adding instructions on how to build from both kinds of tarballs would be much appreciated.
Right now I can build from both kinds of tarballs using setup.py
, but it turns out calling it directly is now deprecated (warnings get printed out).
Building using pip
from a source directory fails for me: a man page is not found even after installing docutils
. This is with 3.15.2, codeberg tarball. So I couldn't convert to using pip, unfortunately.
Running pip3 install pter
works, but then it's hard or very awkward to apply my patches (of which I have more :))
So I'm stuck with using the deprecated setup.py
, which works across the board -- for now. It's by no means a blocker, just something that will be hopefully addressed in the future.
from pter.
I think the current thing to do is run python -m build
and python -m install
. Totally not a circular dependency when you need to install the install
package first 🙃
from pter.
OK, I've tried that, it appears to print the same warnings as pip:
warning: no files found matching '*.html' under directory 'pter'
warning: no files found matching '*' under directory 'man'
Then errors out:
error: can't copy 'man/pter.1': doesn't exist or not a regular file
This is with codeberg tarball, v3.15.2. Package python3-docutils
installed via apt-get
.
(sigh) Back to setup.py :)
from pter.
That's odd. With docutils it should be able to build the man page during python -m build
🤔 maybe there's another dependency that I forgot
from pter.
Okay, I give up for now -- apparently it's far from straight forward to declare a build-time dependency in python. I’ll try to make it not burst into flames when python is being build without having the docutils
installed: e12dc7e0. Let me know if this worked.
from pter.
Curious. I just clean-built in an empty virtualenv with that new configuration and it worked. At what step does it crash for you? python setup.py build
or python setup.py install
?
Edit: right, container… based on it trying to copy, it’s probably the install
step.
from pter.
Could you try to use pip install .
instead of python setup.py
?
from pter.
I'm sorry, the error is slightly different, it's in regard to qpter, not pter. Sorry for the confusion.
Here's the actual error: error: can't copy 'man/pter/qpter.1': doesn't exist or not a regular file
So the install
step still fails, but the error is different from the one in #41 (comment)
from pter.
Could you try to use pip install . instead of python setup.py?
Yes, the following worked for me in a Docker container:
apt-get install --no-install-recommends -y \
python3.11-minimal python3-pip python3-docutils ca-certificates
cd /tmp/pter && pip3 install --break-system-packages . && find /tmp/pter -delete
(For speed of hacking this Dockerfile, I didn't use a virtuaelnv nor do I care for one in an isolated container.)
UPD: apt install python3-docutils
doesn't seem to be necessary for a successful build via pip
.
from pter.
Now it builds fine via python3 ./setup.py build && python3 ./setup.py install
.
But there is a bunch of warnings (they don't appear when building via pip
):
doc/pter.config.rst:213: (WARNING/2) Inline literal start-string without end-string.
doc/pter.config.rst:213: (WARNING/2) Inline literal start-string without end-string.
doc/pter.config.rst:213: (WARNING/2) Inline literal start-string without end-string.
doc/pter.config.rst:213: (WARNING/2) Inline literal start-string without end-string.
The warnings are for the build
stage. There are other warnings but they are related to the deprecated use of setup.py.
UPDATE: There are some other warnings (don't know if they are serious), I wrapped them in asterisks in context:
reating build/bdist.linux-x86_64/egg/EGG-INFO
copying pter.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pter.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pter.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pter.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pter.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pter.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
**zip_safe flag not set; analyzing archive contents...**
**pter.__pycache__.common.cpython-311: module references __file__**
creating dist
creating 'dist/pter-3.15.2.dev0-py3.11.egg' and adding 'build/bdist.linux-x86_64/egg' to it
from pter.
The line 213 warning is … well, a speciality of trying to express "+-@
" (the last character is a space) in reStructuredText. I’ll verify this later. Thanks for the heads-up!
I guess the big win is that it builds and installs now.
from pter.
I guess the big win is that it builds and installs now.
Absolutely!
from pter.
I think I might have fixed the warning. D'you think this issue can be closed?
from pter.
@vonshednob By the way, will you keep uploading tarballs to https://vonshednob.cc/pter/releases.html? I'm asking since one can build man pages form https://vonshednob.cc releases, which doesn't happen with tarballs from codeberg. And I sometimes need to do man pter
:)
from pter.
Related Issues (20)
- Commands to increase/decrease due dates HOT 11
- Distraction-free task editing/creation HOT 3
- Patch for help screen HOT 5
- Mouse-wheel scrolling broken after editing a task externally HOT 38
- Patch to fix caret key issues HOT 1
- Patch to improve line editing some more HOT 6
- Patch: UI proofreading/minor editing HOT 7
- Patch to invert completion highlighting HOT 2
- Helpbar improvements (configurable hints and key sorting) HOT 23
- Regression: pter crashes when choosing a filename to save the task to HOT 1
- Distraction-free mode should show task list on "jump-to" action HOT 6
- Bug: chained keybindings do not seem to work on the Help screen HOT 20
- What does "N" (edit note) do? HOT 6
- Request: Add filename in task format? HOT 13
- Add file name completion when searching HOT 8
- Bug: Editor keybindings not dumped? HOT 2
- Centralised archive with multiple todo.txt file HOT 1
- Support for different sources of tasks
- qpter not finding PyQt5 under python3 (No longer easily available under pip install) HOT 4
- new qpter issue (at least on my end!) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pter.